In pointer Chapter, there is this concept of Pointer to Pointer. Here there are a few declarations
1. int i=50
2. int *ptr
3. int **ptrptr
Now, why does a pointer variable that will store the address of another pointer variable have to be
declared with double ** ?? why will just one * symbol not do?
AND also if i have to declare another pointer that will store the address of ptrptr, should i have to
declare it with *** symbols? or how many?
1
Expert's answer
2014-07-16T05:44:21-0400
Dear Vijayasurya, 1.The pointer to pointer variable is indicated with double ** so that you could see that this pointer stores address of another pointer. If you declare all the pointers (regardless of their depth) with a single star (*) you would be confused soon enough, even if you're dealing with a simple code, as no one can hold everything in the memory. 2. Pointer which stores address of a pointer, which holds address of another pointer should be declared with 3 stars (***). in fact stars quantity increases arithmetically with increasing of depth. Hope this helps.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment