Basic C Programming MCQ Questions and Answers

Take Exam

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
Show Answer Report

182. The statement printf ("%d", 10?0?25:11:12); prints

  • 10
  • 0
  • 12
  • 11
Show Answer Report

183. The statement printf ("%d", (a++)); prints

  • the current value of a
  • the value of a + 1
  • an error message
  • garbage
Show Answer Report

184. The statement printf ("%", ++5); prints

  • 5
  • 6
  • an error message
  • garbage
Show Answer Report

185. The statement printf ("%d", size of (" ")) ; prints

  • an error message
  • 0
  • garbage
  • 1
Show Answer Report

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
Show Answer Report

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
Show Answer Report

188. lint is

  • a C compiler
  • an inter-active debugger
  • a C interpreter
  • a tool for analyzing a C program
Show Answer Report

189. cb is a

  • C code beautifying tool
  • C interpreter
  • C compiler
  • none of the above
Show Answer Report

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
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test