The statement int *ptr = new int; acquires memory to hold an integer and then
A) initializes the allocated memory to 0.
B) assigns an integer value to the variable called ptr.
C) sets ptr to point to the allocated memory.
D) creates a new pointer called int.
E) None of the above
Correct Answer:
Verified
Q7: An array name is a pointer constant
Q8: Which of the following statements correctly deletes
Q31: When the _ is placed in front
Q45: The statement Rectangle * boxPtr; defines a
Q46: A statement that displays the address of
Q47: A dangling pointer is a pointer
A) to
Q49: The statement cin >> *p;
A) stores the
Q52: If dynamically allocated memory is not freed,
A)
Q53: If s is a structure variable and
Q55: Any time you use the new operator,
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