Govt Exams
2D array syntax is int arr[rows][columns]. So int arr[3][4] creates 3 rows and 4 columns.
register keyword suggests the compiler to store the variable in CPU register for faster access. Modern compilers often ignore this hint. You cannot take address of register variables.
volatile tells the compiler that a variable's value can change unexpectedly (e.g., in hardware registers or interrupt handlers), so it should not optimize away repeated reads.
10 % 3 = 1 (remainder), 10 / 3 = 3 (integer division). Output is '1 3'.
Static variables retain their value between function calls and are initialized only once. They persist for the lifetime of the program.
This is the ternary operator. Since 5 < 10 is true, b = 20. If false, b would be 30.
getchar() reads a single character from standard input and returns it. For strings, fgets() or scanf() is used.
The correct syntax for a pointer to int is 'int *ptr;' or 'int* ptr;'. & is a C++ reference, not used in C pointers.
\t is the escape sequence for horizontal tab. \n is newline, \h and \s are not valid escape sequences.
'long long' is guaranteed to be at least 64 bits (8 bytes) as per C99 standard.