0
Can anyone help me... what is the difference between int *ptr and int **ptr.?
2 Answers
+ 1
Let say int *p=&x; and x=5;. And there is this thing : int *a=&p; so when u cout <<"*p"; the value is 5 and when cout<<"**a"; executes answer is also 5
+ 1
*ptr is pointer to a variable and **ptr is pointer to the pointer. **ptr is called double pointer used for indirect access. Raju has explained it with example