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

31. Pick the operators that associate from the right

  • ?:
  • +=
  • =
  • !=
Show Answer Report

32. Pick the operators whole meaning is context dependent.

  • *
  • #
  • &
  • No such operator exists
Show Answer Report

33. Pick the operator that associate from the fleft

  • &&
  • ||
  • ?:
  • ,
Show Answer Report

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

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

36. x -= y + 1; means

  • x=x -y +1
  • x =-x -y -1
  • x=-x + y +1
  • x =x -y -1
Show Answer Report

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

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

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

40. Printf ("%c", 100) ;

  • prints 263
  • prints the ASCII equivalent of 263
  • rings the bell
  • prints garbage
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test