Govt Exams
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.
The 'static' keyword gives a variable static storage duration, preserving its value between function calls.
When -10 is assigned to an unsigned int format (%u), it gets interpreted as a large positive number due to two's complement representation on a 32-bit system.
In C99+, auto is rarely used since local variables are automatic by default, but it remains valid syntax.
(int)(3.9) = 3, then 3 + 0.5 = 3.5, but %d prints as int 3 (truncated).
Local variables declared inside functions have automatic storage duration and are destroyed on function exit.
Volatile prevents compiler optimizations by signaling the variable may change outside program control (hardware/signals).
Global variables with extern keyword have global scope and external linkage across translation units.