Little Endian and Big Endian are used to storing multibyte data type.In Little Endian, least significant byte is read while in Big Endian, most significant byte is read.As we know "short" data type takes 2 Bytes but here we are using "Little Endian" hence only 1 least significant byte will be read.
Here "s" is stored on address 5865 and data is 182.
182 in 2 Byte binary= 00000000 10110110
Now take least significant 1 Byte(8 bits)= 10110110
But "s" is 2 byte 2's compliment short integer. Hence decimal value of 10110110 (2's compliment representation) = -74
"%d" in statement 2 shows that it will print a integer value.
Hence statement 2 will print -74 (negative 74)
Consider the following C program: int maino short S; printf("Address of S is %d\n", &S); //...
9. Which of the following is true for the following program? #include <stdio.h> int maino int i = 1; switch (0) case 1: printf("%d", 0); case 2: printf("%d", 0); case 3: printf("%d", 0); default: printf("%d", 1); return 0; } (2 points) The program has no error, the output is 1111 The program has no error, the output is 1 The program produces a compile time error, because there are no break statements The program produces a compile time error, because...