The statement int *ptr = new int; acquires memory to hold an integer and then
A) creates a new pointer called int.
B) sets ptr to point to the allocated memory.
C) initializes the allocated memory to 0.
D) assigns an integer value to the variable called ptr.
E) None of the above
Correct Answer:
Verified
Q4: With pointer variables you can access, but
Q24: Any arithmetic operation may be performed on
Q25: A pointer can be passed as an
Q33: A pointer variable may be initialized with
A)the
Q34: With pointer variables, you can manipulate data
Q35: can be used as pointers.
A)C++ string objects
B)Punctuation
Q36: The term pointer can be used interchangeably
Q38: Dynamic memory allocation occurs
A)when a pointer is
Q39: A reason for passing a pointer to
Q40: The statement cout << &num1; will output
A)the
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