Quiz
Review and assess your understanding of dynamic memory allocation in C++ by completing this quiz. Ensure you can confidently use new and delete operators and manage dynamic arrays before moving to the next chapter on structures.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What is the value of *ptr1 at the end of this code?
int main(){
int * ptr1 ;
double *ptr2;
ptr1 = new int;
ptr2 = new double;
*ptr1 = 70;
*ptr2 = 59.5;
ptr1 = ptr2;
}
A.
70
B.
59.5
C.
59
D.
Error
1 / 4
šCongratulations! You have ...