Multiple Choice
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
Correct Answer:
Verified
Related Questions
Q4: Which of the following assigns to p1
Q5: Declare a pointer variable named ptr to
Q6: Dynamically created variables have no name.
Q7: What is the output of the following
Q8: Even though pointers point to addresses which
Q10: Assuming that the pointer variable p1 is
Q11: In which case would you consider using
Q12: If p1 is an integer pointer that
Q13: When you return a dynamic array to
Q14: Write the code to declare a dynamic