C - Operators and Expressions Questions and Answers
Operators and expressions are the core of performing calculations and logic in C programs. This section features C programming questions and answers focusing on arithmetic, relational, logical, bitwise, and assignment operators. Designed for TCS, Infosys, and Capgemini aspirants, these MCQs test both concept clarity and coding accuracy. Practicing these C Operators and Expressions questions with answers helps you strengthen your understanding of how C executes and evaluates expressions—essential for both programming interviews and technical exams.
C - Operators and Expressions
Showing 10 of
65 questions
24. The bitwise AND is used for
- masking
- comparison
- division
- shifting bits
25. The bitwise OR is used to
- set the desired bits to 1
- multiply numbers
- divide numbers
- set the desired bits to 0
26. Tthe bitwise XOR is used to
- complement the desired bits
- multiply numbers
- divide numbers
- set the desired bits to 0
27. Logical right shift results in
- maintaining the leftmost bit value
- zero is shifted to the leftmost bit position
- one is shifted to the rightmost bit value
- zero is shifted to the rightmost position
28. Arithmetic right shift results in
- zero is shifted to the leftmost bit position
- one is shifted to the rightmost bit value
- maintains the leftmost bit value
- zero is shifted to the rightmost bit position
30. Identify the valid compound assignment.
- <<=
- >>=
- options a and b
- >>>=