Execution time with pointers is faster, because data are manipulated with the address, that is, direct access to memory location.
Memory is accessed efficiently with the pointers. The pointer assigns as well as releases the memory space. Memory is dynamically allocated.
Pointers are used with data structures. They are useful for representing two-dimensional and multi-dimensional arrays.
We can access the elements of any type of array, irrespective of its subscript range.
Pointers are used for file handling.
Pointers are used to allocate memory in a dynamic manner.
In C++, a pointer declared to a base class could access the object of a derived class. However, a pointer to a derived class cannot access the object of a base class. The compiler will generate an error message βcannot convert βA* to B*,ββ where A is the base class and B is the derived class.
Test Your Skills
Test Your Skills Now!
This is only a practice test, it is designed to help you revise your concepts
The test contains questions, only 1 option is correct for each question
This is a timed test.
After you have finished the test, press on the 'Finish Test' button to know your score and get the correct answers