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
181. For the previous question, which of the following macro-calls, will find the hypotenuse of a right angled triangle with sides a + 1 AND B + 1 ?
- log (n) + 1
- log (n - 1) + 1
- log (n + 1) + 1
- none of the above
183. The statement printf ("%d", (a++)); prints
- the current value of a
- the value of a + 1
- an error message
- garbage
185. The statement printf ("%d", size of (" ")) ; prints
- an error message
- 0
- garbage
- 1
186. If p is a pointer to an integer an t is a pointer to a character then size of (p) will be
- same as that sizeof (t)
- greater than that of sizeof (t)
- less than that sizeof (t)
- none of the above
187. Which of the following comments about arrays and pointers is/are not true ?
- Both are exactly same
- Array is a constant pointer
- Pointer is an one-dimensional array
- Pointer is a dynamic array
188. lint is
- a C compiler
- an inter-active debugger
- a C interpreter
- a tool for analyzing a C program
190. It is not advisable to use macros instead of functions because
- it increase the code size
- no type checking will be done
- recursion is not possible
- pointers cannot be used with macro identifiers