Hello everybody , I'm new here .. I have a little question :
Given this code :
the output is "G" ( ASCII for 71 ) .Code:int *a; char *c; c=malloc(sizeof(char)); a=malloc(sizeof(int)); *(a) = 71; c = a; printf("%c\n",*c);
The problem is that i was expecting some other value , because a is stored on 4 bytes , and c on 1 byte , so if a was 00000000 00000000 00000000 01110001 (for example ) , c should be 00000000 (the first byte) and the output should be different .
Can you please tell me what am i missing ?
Thank you
LE : Little Endian . I need more coffee so i can stop posting lame questions .