Assuming myValues is an array of int values, and index is an int variable, both of the following statements do the same thing.
cout << myValues[index] << endl;
cout << *(myValues + index)<< endl;
Correct Answer:
Verified
Q15: A pointer can be used as a
Q16: In C++11 you can use smart pointers
Q20: The ampersand (&) is used to dereference
Q31: Dynamic memory allocation occurs
A) when a new
Q36: What will the following code output?
Q36: What will the following code output?
Q37: An array name is a pointer constant
Q38: What will the following code output?
Q39: Which statement displays the address of the
Q41: To use any of the smart pointers
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