Pages

Tuesday 5 March 2019

Program on single and double pointer

Program on single and double pointer

#include <stdio.h>
void main()
{
   int x=4,y,z;
   int *sp;
   int **dp;
   printf("\n x value is %d",x);
   printf("\n x address is %p",&x);  
   sp=&x; 
   printf("\n y value is %p",sp);
   printf("\n y address is %p",&sp);  
   dp=&sp;
   printf("\n z value is %p",dp);
   printf("\n z address is %p",&dp);  
   *sp+=1;
   y=*sp;  
   printf("\n y value is %d",y);
   **dp+=3;
   z=**dp;
   printf("\n z value is %d",z);
   printf("\n value of x+y+z =%d",(x+y+z));
}
output:

No comments:

Post a Comment

Programs in turboc3 : Files

File Handling in C File Handling concept in C language is used for store a data permanently in computer. Using this concept we can store our...