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

1. Whcih is most appropriate one ?

  • x<<1
  • x*2
  • x+x
  • All are same
Show Answer Report

2. Bitwise operators are applicable only on

  • Integers
  • Integers and characters
  • Integers and floats
  • Integers, floats and double
Show Answer Report

3. Which operator enjoys the lowest priority from the group of operators ?

  • Comma operator
  • Conditional operator
  • Assignment operator
  • Unary operator
Show Answer Report

4. which operator is used both as an operators and a keyword?

  • Right shifting operator
  • Cast operator
  • Sizeof operator
  • Token pasting operator
Show Answer Report

5. How to find generic root of a number ?

  • p%11
  • p%9
  • p%13
  • None of the above
Show Answer Report

6. Find the output. void main ( ) { int a=8, x; x=++a++a+++a; printf(&quot;%d, %d, x, a); }

  • 33,11
  • 24,11
  • 24,5
  • Compilation error
Show Answer Report

7. x%y is equal to

  • y-(x/y)*x
  • x-(x/y)*y
  • x-(y/x)*x
  • y-(y/x)*y
Show Answer Report

8. Which of the following operator has left to right associatively?

  • Sizeof opeator
  • Paranthesis
  • Conditional operator
  • Assignment operator
Show Answer Report

9. Find the output void main ( ) { int x,y; x=10; y=sizeof(++x); printf(&quot;x=%d y=%d&quot;, x,y); }

  • x=10 y=2
  • x=11 y=2
  • Compilation error
  • None of these
Show Answer Report

10. Find the output void main ( ) { int a,b,c=32; if (a==b==c) printf(&quot;dealhi challo&quot;); else printf(&quot;d or die&quot;); }

  • delhi chaool
  • do or die
  • compile time error
  • Runtime error
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test