MCQs
None.
signed char will be a negative number.
Output:
$ cc pgm2.c
$ a.out
-128
None.
Output:
$ cc pgm3.c
$ a.out
a
0.1f results in 0.1 to be stored in floating point representations.
Output:
$ cc pgm5.c
$ a.out
equal
0.1 by default is of type double which has different representation than float resulting in inequality even after conversion.
Output:
$ cc pgm4.c
$ a.out
not equal
Size of any type of pointer is 4 on a 32-bit machine.
Output:
$ cc pgm6.c
$ a.out
p and q are 4 and 4
Since the size of the structure depends on its fields, it has a variable size.
char has lesser bytes than int and int has lesser bytes than double in any system
Since the ASCII value of a is 97, the same is assigned to the float variable and printed.
Output:
$ cc pgm8.c
$ a.out
97.000000
Since the size of a union is the size of its maximum datatype, here int is the largest hence 4.
Output:
$ cc pgm7.c
$ a.out
4