0
In desperate need of help, I can’t figure this out
I can’t figure out how to do this: can anyone help? Write a C++ program where the user has to 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.
2 Respuestas
+ 2
Well it's a basic one :-
int a, b;
cin >> a >> b;
int *ptrA, *ptrB;
ptrA = &a;
ptrB = &b;
cout << *ptrA << ptrB;
+ 1
thank you Harshit!!!