Posted By:
2 Jul, 2013 6:52 am PDT

Pointers in C++

What are pointers? What is the use of them?

         A pointer is a special variable meant just to store the address of any other variable or function. Pointer variables unlike ordinary variables cannot be operated with all the arithmetic operations. It follows a special arithmetic called as pointer arithmetic.


int *ap;     //pointer declaration

int a=5;

ap=&a;     // assigning the address of a to ap

Was it useful?  

Please login to reply to this problem.