vendredi 6 mars 2015

What happens if you make a char *ptr store address of integer variable



I have the following code snippet



int a = 10;
char *p = &a;
printf("%d", *p);
printf("%c", *p);


What happens in memory? What will it print and why?




Aucun commentaire:

Enregistrer un commentaire