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

11. Consider the statement putchar (getchar {}); putchar (getchar {}); if a b is the input, the output will be

  • an error message
  • this can't be the input
  • ab
  • a b
Show Answer Report

12. Let a, b be two positive integers. Which of the following options correctly relates / and % ?

  • b = (a/b) *b + a%b
  • a = (a/b) *b + a%b
  • b = (a%b) *b +a/b
  • a = (a%b) *b a/b
Show Answer Report

13. Literal means

  • a string
  • a string constant
  • a character
  • an alphabet
Show Answer Report

14. Length of the string "correct' is

  • 7
  • 8
  • 6
  • implementation depend
Show Answer Report

15. Which of the following are true regardless of the implementation ?

  • sizeof (int) is not less than sizeof (long)
  • sizeof (short) equals sizeof (int)
  • sizeof (int) equals sizeof (unsigned)
  • sizeof (double) is not less than sizeof (float)
Show Answer Report

16. Coercion

  • takes place across an assignment operator
  • takes place if an operator has operands of different data types.
  • means casting
  • none of the above
Show Answer Report

17. Choose the correct statements

  • Casting refers to implicity type conversion
  • Casting refers to implicity type conversion
  • Casting refers to explicit type conversion
  • Coercion refers to explicit type conversion
Show Answer Report

18. Consider the following program fragment char c = 'a'; while (c++ <= 'z') putchar (xxx) If the required output is abcdefghijklmnopqrstuvwxyz, then xxx should be

  • c
  • c++
  • c-1
  • -c
Show Answer Report

19. Which of the following comments are true?

  • C provides no input-output feature
  • C provides no file access features.
  • C borrowed most of its ideas from BCPL
  • C provides no features to manipulate composite objects
Show Answer Report

20. If y is of integer type then the expression 3 * (y - 8) / 9 and ( y - 8) / 9 * 3

  • must yield the same value
  • must yield different values
  • may or may not yield the same value
  • none of the above
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test