• C

dynamic integer pointers

tried to solve but having problems with this. P and Q are declared as dynamic integer points, what is printed by the following statements:
int *P=new int; int*Q= new int; Q=P; *Q=4; cout<<*P; cout<<*Q; int*Q= new int; *Q=5; cout<<*P; cout<<*Q;
beachbummAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
3rsrichardConnect With a Mentor Commented:
4
4
4
5
0
 
beachbummAuthor Commented:
THANKS!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.