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
32. Pick the operators whole meaning is context dependent.
- *
- #
- &
- No such operator exists
34. The following code fragment int x, y = 2 z, a; x = (y * = 2) + (z = a = y); Print ("%d", x);
- prints 8
- prints 6
- prints 6 or e depending on the compiler implementation
- is syntactically wrong
35. If n has the value 3, then the output of the statement printf("%d %d", n++, ++n);
- is 3 5
- is 4 5
- is 4 4
- is implementation dependent
37. Which of the following comments about the ++ operator are correct ?
- It is a unary operator
- The operand can come before or after the operator
- It cannot be applied to an expression
- It associated from the right
38. In standard C, trigraphs in the source program are translated
- before the lexical analysis
- after the syntax analysis
- before the recognition of escape characters in strings
- during the intermediate code generation phase
39. The expression 5 - 2 - 3 + 5 - 2 will evaluate to 18, if
- - is left associative and * has precedence over -
- - is right associateive and * has precedence over -
- - is right associative and - has precedence over *
- - is left associative and - has precedence over *
40. Printf ("%c", 100) ;
- prints 263
- prints the ASCII equivalent of 263
- rings the bell
- prints garbage