Basic C Programming MCQ Questions and Answers
Basic C Programming MCQ questions with answers help candidates master the fundamentals of C language — one of the most popular programming languages for beginners and interview aspirants. These programming questions and answers focus on syntax, operators, loops, functions, and data handling. Practicing C programming MCQs strengthens logic and helps students perform better in technical assessments by TCS, Infosys, HCL, and other top recruiters. Each question is designed to test conceptual understanding and problem-solving skills, making it ideal for both practice and revision before coding interviews or placement exams.
Basic C Programming MCQ
Showing 10 of
198 questions
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
82. C does no automatic array bound checking. This is
- true
- false
- C's asset
- C's shorting
85. printf ("%-10.*s", hh, wer); outputs
- NO SU
- NO SUBSTITUTE FO
- NO SU
- error message
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