Which of the following statements is not valid C++ code?
A) int ptr = &num1;
B) int ptr = int *num1;
C) float num1 = &ptr2;
D) All of these are valid
E) All of these are invalid
Correct Answer:
Verified
Q16: In C++11 you can use smart pointers
Q17: When you work with a dereferenced pointer,
Q18: It is legal to subtract a pointer
Q19: An array name is a pointer constant
Q20: The ampersand (&) is used to dereference
Q22: Assuming ptr is a pointer variable, what
Q23: Which of the following statements displays the
Q24: What will the following statement output?
Cout <<
Q25: When you pass a pointer as an
Q26: If you are using an older computer
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