Expressions Questions and Answers

Take Exam

Expressions in C Language are fundamental to understanding how operations, precedence, and evaluation work in programming. Practicing programming questions and answers related to C expressions helps students master operator hierarchy and logical computation. Commonly asked in TCS, Infosys, and Wipro placement papers, these C programming MCQs test both conceptual clarity and coding accuracy. This section provides C language expressions questions with step-by-step explanations and solutions to prepare you for technical interviews and competitive programming tests.

Expressions

Showing 10 of 26 questions

1. Which of the following is the correct order of evaluation for the below expression? z = x + y * z / 4 % 2 - 1

  • * / % + - =
  • = * / % + -
  • / * % - + =
  • * % / - + =
Show Answer Report

2. Which of the following correctly shows the hierarchy of arithmetic operations in C?

  • / + * -
  • * - / +
  • + - / *
  • / * + -
Show Answer Report

3. Which of the following is the correct usage of conditional operators used in C?

  • a>b ? c=30 : c=40;
  • a>b ? c=30;
  • max = a>b ? a>c?a:c:b>c?b:c
  • return (a>b)?(a:b)
Show Answer Report

4. Which of the following is the correct order if calling functions in the below code? a = f1(23, 14) * f2(12/4) + f3();

  • f1, f2, f3
  • f3, f2, f1
  • Order may vary from compiler to compiler
  • None of above
Show Answer Report

5. Which of the following are unary operators in C? 1.     ! 2.     sizeof 3.     ~ 4.     &&

  • 1, 2
  • 1, 3
  • 2, 4
  • 1, 2, 3
Show Answer Report

6.  In which order do the following gets evaluated Relational Arithmetic Logical Assignment

  • 2134
  • 1234
  • 4321
  • 3214
Show Answer Report

7. What is the result of the expression: 5 + 3 * 2?

  • 16
  • 11
  • 13
  • 10
Show Answer Report

8. Which of the following is a valid C identifier?

  • 2var
  • var_name
  • var-name
  • var name
Show Answer Report

9. What is the value of the expression: 10 / 3?

  • 3
  • 3.333
  • 3.0
  • 4
Show Answer Report

10. What does the expression: 7 % 2 evaluate to?

  • 1
  • 3
  • 0
  • 2
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test