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.
Q.76Medium
Which of the following about register variables is TRUE?
Answer: B
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.
Q.77Easy
What is the correct way to declare a two-dimensional array of integers with 3 rows and 4 columns?
Answer: A
2D array syntax is int arr[rows][columns]. So int arr[3][4] creates 3 rows and 4 columns.
Q.78Hard
What will be the output of: int a = 1; int b = 2; a = a + b; b = a - b; a = a - b; printf("%d %d", a, b);
Answer: B
Initial: a=1, b=2. After step 1: a=3, b=2. After step 2: a=3, b=1. After step 3: a=2, b=1. Output is '2 1'.
Q.79Hard
Which of the following about function pointers in C is correct?
Answer: B
int (*func)(); declares a pointer to a function that returns int. Option A declares a function returning pointer to int.
Q.80Hard
What is the output of: float x = 25; printf("%f", x);
Answer: B
25 is integer division (not float division), so result is 2 (integer), then converted to 2.0 (float).