What will be output of following program? Assume that you are running this program in little-endian processor.
#include
int main( ) {
short a = 320;
char * ptr;
ptr = (char *)&a:
printf(“%d”,*ptr)
return 0;
}
1
1
2
320
3
64
4
Compilation Error
What will be output of following program? Assume that you are running this program in little-endian processor.
#include
int main( ) {
short a = 320;
char * ptr;
ptr = (char *)&a:
printf(“%d”,*ptr)
return 0;
}