If the code shown below is executed on a little endian machine, then what will be the output of the following C code?
Posted: Wed Jul 13, 2022 7:56 pm
#include<stdio.h>
main()
{
int y=1;
printf("%d", (*(char*)&y));
}
a) 1
b) 1000
c) 9999
d) 0
main()
{
int y=1;
printf("%d", (*(char*)&y));
}
a) 1
b) 1000
c) 9999
d) 0