Question: Write a program that asks the user to enter integers as inputs to be stored in the variables 'a' and 'b' respectively. There are also
Write a program that asks the user to enter integers as inputs to be stored in the variables 'a' and 'b' respectively. There are also two integer pointers named ptrA and ptrB. Assign the values of a and b to ptrA and ptrB respectively, and display them, and their stored address (both should be represented by some operation regarding ptrA and ptrB). Then, change values of a and b, and do the display values and addresses by the pointers again. Observe what the output is. At last, answer one question using a comment at the bottom of your program: when you reassign values for a and b, do you need more pointer variables to be linked to them?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
