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

C, how to learn programming skills

how to learn programming skills

Looping, #questiStarting with a blank solution, write a program to prompt t...

#questiStarting with a blank solution, write a program to prompt the user for an employee number, hourly rate and hours worked. Compute and display the employee number, gross weekl

Euclidean Algorithm , how can I find the GCD of 2 given numbers using Eucli...

how can I find the GCD of 2 given numbers using Euclidean Algorithm ?

Subtraction of numbers, Two numbers to be subtracted using bitwise operatio...

Two numbers to be subtracted using bitwise operations

C programming, write a c program to solve exanple of lamis therom

write a c program to solve exanple of lamis therom

Array, Write a program to count the prime number in array

Write a program to count the prime number in array

Implement mini version of linux ''tar'', I need to implement a mini version...

I need to implement a mini version of linux''s ''tar'' function in C.

List, Is there any difference between List x; and List x ()? Can you please...

Is there any difference between List x; and List x ()? Can you please provide me assignment help.

File processing, Write a C++ program doing the following: The program reads...

Write a C++ program doing the following: The program reads from the keyboard the numbers of rows and columns of a 2-D array of integers. Then, it allocates this array (let’s name i

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