Govt. Exams
Entrance Exams
register requests compiler to store variable in CPU register for faster access but falls back to memory if unavailable, combining automatic allocation with optimization hints.
signed int reserves 1 bit for sign, giving range -2147483648 to 2147483647. unsigned int uses all 32 bits for magnitude, giving 0 to 4294967295.
Both declarations make the array elements constant. Option A initializes the array, while B declares it without initialization (valid at global scope).
Signed short int is typically 2 bytes (16 bits), providing a range from -2^15 to 2^15-1.
Correct exponent notation requires a digit before and after 'e'. 1.5e2 represents 1.5 × 10² = 150.0
const variables cannot be modified after initialization. Attempting to assign a new value causes a compilation error.
The 'static' keyword, when used at file scope, restricts the variable's visibility to that file only (internal linkage).
Uninitialized local variables contain garbage values (whatever was in memory). Only static/global variables are zero-initialized.
5/2 performs integer division resulting in 2, which is then stored in float f. printf("%f") prints 2.000000 (default 6 decimal places).
C99 standard guarantees 'long long' to be at least 64 bits (8 bytes), but some systems may allocate more.