Govt Exams
The C standard guarantees int is at least 2 bytes, but most 32-bit systems use 4 bytes. The exact size is implementation-dependent.
In C, floating-point constants like 3.14 are treated as double by default. To specify float, you need to use 3.14f suffix.
restrict prevents pointer aliasing (not allows). It tells compiler that pointer is the only way to access that object.
Due to structure padding/alignment, the size becomes 24 bytes (8-byte alignment for double). Members are padded to maintain alignment.
extern is a declaration (not definition) that tells compiler the variable exists elsewhere in program. It provides global scope.
register is a hint to compiler to store variable in CPU register for faster access. Compiler may ignore this if registers unavailable.
sizeof(char)=1, sizeof(int)=4, sizeof(float)=4 on 32-bit systems. Total: 1+4+4=9 bytes.
Option B is the correct C99/C11 syntax. #define is preprocessing, while const is a type qualifier that provides type safety.
Implicit conversion truncates the fractional part. Modern compilers may warn but allow this. Example: int x = 5.9; results in x = 5.
The * applies only to p. So p is int*, and q is int. To declare both as pointers: int *p, *q;