Quiz on C++ Pointers

In C++, pointers represent variables that hold the address of other variables. The data type of a pointer is the same as that of a regular variable. Let’s take a quick quiz to see how well we understand Pointers in C++. Happy Learning!

Summary

C++ allows creating pointers to point to pointers that can point to data and other pointers. If you wish to increase the complexity of your understanding of Pointers we suggest learning each concept in detail first. I wish you a great learning experience!

2 Responses

  1. GM says:

    The answer to this question should be C , we do not initialize the contents of the array , and i ran it on Visual Studio to check the output , the first value is initialized by the statement *ptr = 10 , and it replaced the first element of the array from a garbage value to 10 , after that we just increment the array idx and increment the garbage value by one , so C is correct.

  2. tayyab says:

    how can you add a character in a integer array of pointer

Leave a Reply

Your email address will not be published. Required fields are marked *