How to save the address of a variable / Use of pointer in C programming!!
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
int main()
{
int dog = 19;
printf("Address \t Name \t Value\n");
printf("%p %s \t %d \n",&dog,"dog",dog);
int*Gdog = &dog;
printf("%p %s \t %d \n",Gdog,"dog",dog);
printf("%p %s \t %d \n",&Gdog,"Gdog",Gdog);
return 0;
}
Comments
Post a Comment