Pointers with an array, C/C++ Programming

Assignment Help:

// Basic pointer code

#include "stdafx.h"

#include iostream

using namespace std;

int _tmain(int argc, _TCHAR* argv[])

{

            int FirstNumber, SecondNumber;

            int * ptrNumber;

            ptrNumber = &FirstNumber;

            *ptrNumber = 10;

            ptrNumber = &SecondNumber;

            *ptrNumber = 20;

            cout << "FirstNumber is " << FirstNumber << endl;

            cout << "SecondNumber is " << SecondNumber << endl;

            return 0;

}

Output:

FirstNumber is 10
SecondNumber is 20

Related Discussions:- Pointers with an array

Flowchart.., flowchart of c programing to check the given number is prime o...

flowchart of c programing to check the given number is prime or not

STRING, getting a palindrome using minimum replacement

getting a palindrome using minimum replacement

Loop, Write a program that writes your name on the monitor ten times. Write...

Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.

Least cost method, c program to implement least cost method

c program to implement least cost method

Recursion, Given a string, print all possible palindromic partitions using ...

Given a string, print all possible palindromic partitions using recursion

Output, i need my home work

i need my home work

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd