Which of the following code snippet can be used to access/print the second index of single dimensional array of integer pointer pt cout<<*ptr[1]; cout<<*(ptr 1); cout<<ptr[1]; cout<*ptr+1;

Computers

Question
Which of the following code snippet can be used to access/print the second index of single dimensional array of integer pointer pt
cout<<*ptr[1];
cout<<*(ptr 1);
cout<<ptr[1];
cout<*ptr+1;
Answer

cout<<*(ptr+1);

Download to view full explanation
The correct code snippet to access/print the second index of a single dimensional array of integer pointer `ptr` is `cout<<*(ptr+1...
Solve any homework question FREE with our app, NO PAYMENT required!