The declaration int b[100]; declares an array named b containing 100 elements of type int. Array indexing begins at 0, so the valid indexes are b[0] through b[99]. This declaration does not initialize the array elements automatically if it is a local automatic array.
Programming in C MCQ - Constants, Variables and Data Types
The declaration extern int i; tells the compiler that the integer variable i is defined elsewhere. However, no actual definition of i is present in the given program. Assigning i = 20 requires the variable to exist, so the linker normally reports an undefined reference to i. Therefore, the intended answer is D (Error). Additionally, main should be declared as int main(void) in modern C, and sizeof returns size_t, which should be printed using %zu rather than %d.
The declaration extern int a; inside main refers to the file-scope variable defined later as int a = 20;. Because a has static storage duration and is initialized to 20, printf prints 20. Therefore, the intended answer is B (20), assuming older C syntax that permits an implicit int return type for main. In modern C, the function should be declared int main(void).
An automatic local variable that is declared without an initializer has an indeterminate value. Reading that value before assigning a valid value can result in undefined behavior. Therefore, it should not be assumed to contain zero. The term garbage value is commonly used in introductory C programming to describe such an uninitialized value.
The enumerated data types give an opportunity to invent our own data type and define what value the variable of this data type can take.

