Tuesday, June 11, 2019

pointer in c

#include <stdio.h>

int main () {

   int  var = 20;   /* actual variable declaration */
   int  *ip;        /* pointer variable declaration */

   ip = &var;  /* store address of var in pointer variable*/

   printf("Address of var variable: %x\n", &var  );

   /* address stored in pointer variable */
   printf("Address stored in ip variable: %x\n", ip );

   /* access the value using the pointer */
   printf("Value of *ip variable: %d\n", *ip );

   return 0;
}

output:::


Note:

please send the questions which you are facing problem in C Language.

also write interview questions which are you faced in during interview related to C Language.

so i can try to solve them and send you back.

No comments:

Post a Comment

python class topic video