What is the output of the following code fragment?
Int v1=2, v2=-1, *p1, *p2;
P1 = & v1;
P2= & v2;
P2=p1;
Cout << *p2 << endl;
A) 2
B) -1
C) -2
D) 1
Correct Answer:
Verified
Q17: Dynamically created variables have no name.
Q18: The size of a dynamic array is
Q19: In the statement cout << *p1;, the
Q20: You can assign an array to a
Q21: If p1 is an integer pointer that
Q23: Given that a typedef for IntPtr defines
Q24: Which of the following correctly declares a
Q25: What is the output of the following
Q26: Given that p1 is a pointer variable
Q27: Which of the following is not true?
A)
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