Given that p1 is a pointer variable of the string class, which of the following are legal statements?
A) p1 = new int;
B) cout << *p1;
C) p1 = new char[10];
D) *p1 = new string;
E) B and D
Correct Answer:
Verified
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
Q25: What is the output of the following
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
Q31: What is wrong with the following code
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