Basic C Programming MCQ
Basic C Programming MCQ
81. The following program
main ()
{
static char a[3][4] = {"abcd", "mnop", "fghi"};
putchar (**a);
}
- will not compile successfully
- results in run-time error
- prints garbage
- none of the above
86. If n has the value 3, then the statement a[++n] = n++;
- assigns 3 to a [5]
- assign 4 to a[5]
- assign 4 to a[4]
- what is assigned is compiler-dependent
87. Choose the statement that best defines an array
- It is a collection of items that share a common name.
- It is a collection of items that share a common name and occupy consecutive memory locations.
- It is collection of items of the same type and storage class that share a common name and occupy consecutive memory locations.
- none of the above
88. Choose the correct statements.
- Strictly speaking C support 1-dimensional arrays only.
- An array element may be an array by itself.
- Array elements need not occupy contiguous memory locations.
- None of the above
89. The order in which actual arguments are evaluated in a function call
- is from the left
- is from the right
- is compiler-dependent
- none of the above
90. If a global variable is of storage class static, then
- the static declaration is unnecessary if the entire source code is in a single file
- the variable is recognized only in the file in which is defined
- it results in a syntax error
- none of the above