C Operators Questions and Answers

Take Exam

Operators in C are symbols that perform operations on variables and values, forming the basis of all computational logic. Questions on C operators, including arithmetic, logical, relational, and bitwise operators, are common in programming questions and answers for campus placements and technical interviews. Companies like Infosys, Wipro, and TCS often include C operator problems in their online coding tests. This section provides in-depth C operator questions with solutions and explanations to help learners understand operator precedence, associativity, and expression evaluation.

C Operators

Showing 10 of 122 questions

11. Find the output void main ( ) { unsigned int x=~5; print 9"%u", x); }

  • 5
  • 4
  • 2
  • 65530
Show Answer Report

12. Find the outpu void main ( ) int x=10; printf("%d", clculate (x++, ++x, x++); } calculate (int x, int y, int z) { return (x+y+z); }

  • 31
  • 33
  • 34
  • None of these
Show Answer Report

13. Find the output void main ( ) { int x, y=6; x=y>x ||++y; printf("%d %d', x, y); }

  • 1 7
  • 0 7
  • 1 6
  • None of these
Show Answer Report

14. which operator is used to complement a number ?

  • | operator
  • ^ operator
  • & operator
  • Both a and b
Show Answer Report

15. Find the outpu void main( ) { int x=+17>>2; printf(%d', x); }

  • -3
  • 3
  • -5
  • 7
Show Answer Report

16. If both are operands of /are integers then the fractional part of the quotient is

  • tounded
  • Truncated
  • Overflow
  • None of these
Show Answer Report

17. Coercion refers as :

  • Conversion of derived data types to scalar data types
  • Conversion of desired data types to scalar data types
  • Conversion of scalar data typesto derived data types
  • Conversion of scalar data types to desired data types
Show Answer Report

18. how to check numeric key is on/off it char far *p=0x417

  • *p&64==64
  • 8p&32==32
  • *p^64==64
  • *p|32==32
Show Answer Report

19. When a cast operator (short signed int) applied to signed int but the range of signed int does not fit in range of short signed int then the result is:

  • Conditional defined
  • Implementation defined
  • Logical defined
  • Syntax error
Show Answer Report

20. what will be the value of 'x' after execution of the following program? void main ( ) { int x=!0*20; }

  • 10
  • 20
  • 1
  • 0
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test