#include <stdio.h>
      int main()
      {
          printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
          int var = 24;   // actual variable declaration
          int *p;
          p = &var;   // storing address of int variable var in pointer p
          printf("\n\nAddress of var variable is: %x \n\n", &var);
          // address stored in pointer variable
          printf("\n\nAddress stored in pointer variable p is: %x", p);
          // access the value using the pointer variable
          printf("\n\nValue of var variable or the value stored at address p is   %d ", *p);
          printf("\n\n\t\t\tCoding is Fun !\n\n\n");
          return 0;
      }
      
      C language logo

      Pointers

      0

      0

      avatar
      natalie19970

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.