What is the output of the following code?
Int *p1, *p2;
P1 = new int;
P2 = new int;
*p1=11;
*p2=0;
P2=p1;
Cout << *p1 <<" " << *p2 << endl;
A) 11 0
B) 0 11
C) 11 11
D) 0 0
Correct Answer:
Verified
Q20: You can assign an array to a
Q21: If p1 is an integer pointer that
Q22: What is the output of the following
Q23: Given that a typedef for IntPtr defines
Q24: Which of the following correctly declares a
Q26: Given that p1 is a pointer variable
Q27: Which of the following is not true?
A)
Q28: What is the output of the following
Q29: Given that p1 is an integer pointer
Q30: If a program requires a dynamically allocate
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents