Consider the following code snippet:
P= (int *)malloc(sizeof(int));
write the data type of p,q and r
a) Int *p ; int **q; int ***r
b) Int **p ; int ** q ; int * r;
c) Int ***p ; int ** q; int **r;
d) None of the above
P -> is a pointer; (int *p)
Q -> is a pointer that holds address of P; (int **q)
R -> is a pointer that holds address of Q; (int ***r)
p is a normal pointer. so (intp).
q contains the address of pointer p. so (intq).
r contains the address of pointer q. so (intr)
Here in the sollution:-
p is normal pointer
q is double pointer
while r is a triple pointer.