C
Programming and Technical
Programming
Definition
Q. What is the meaning of multilevel pointers in c?
A. A pointer is pointer to another pointer which can be pointer to others pointers and so on is known as multilevel pointers. We can have any level of pointers
Read Solution (Total 1)
-
- Examples of multilevel pointers in c:
#include
int main(){
int s=2,*r=&s,**q=&r,***p=&q;
printf("%d",p[0][0][0]);
return 0;
}
Output: 2
Explanation:
As we know p[i] =*(p+i)
So,
P[0][0][0]=*(p[0][0]+0)=**p[0]=***p
Another rule is: *&i=i
So,
***p=*** (&q) =**q=** (&r) =*r=*(&s) =s=2 - 10 years agoHelpfull: Yes(0) No(0)
C Other Question