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

61. Find the output void main ( ) { int a=2; printf("%d%d%d', a++, ++a, a); }

  • 2 3 4
  • 3 4 5
  • 3 3 2
  • 4 3 2
Show Answer Report

62. Find the output. void main (  ) { int a=1, b; b=+-+a+-a; printf("%d', b); }

  • 0
  • 2
  • -2
  • None of these
Show Answer Report

63. The correct order of evaluation for the expression a||!b && c is

  • !b, !b &&c, a|| (!b&&c)
  • b&&c, !(b&&c), a|| (!b&&c))
  • !b, a|| !b) &&c
  • a, a || (!b&&c), !b, (!b&&c)
Show Answer Report

64. Find the out void main ( ) { int a, b=0, c=10; if (c=a==b) printf("true"); else printf("false"); }

  • true
  • false
  • Compilation error
  • None of these
Show Answer Report

65. Find the output void main ( ) { int a=5; a=a-~a +1; printf ("%d", a); }

  • 1
  • -5
  • 0
  • None of these
Show Answer Report

66. Find the output void main ( ) int x=11, y=5, z=2; x%=y*=; printf("%d",x); }

  • 2
  • 1
  • 25
  • 27
Show Answer Report

67. Find the output void main ( ) int a=5; b; b=(a-=5) && (a+=5); printf("%d", a); }

  • 5
  • 0
  • 10
  • None of these
Show Answer Report

68. Find the output void main ( ) { int i=3, j=5; i++; if(i==--j) break; else printf("continue"); printf("%d",j); }

  • Continue4
  • No output
  • Compilation error
  • None of these
Show Answer Report

69. Find the output void main ( ) { int a=2, b; b=a+*++a*a++; printf("%d",b); }

  • 27
  • 64
  • 48
  • None of these
Show Answer Report

70. What is the value of x ifa=b=c=1 x=--a ||++b*(3-1)/2&&b*l(--c/3)

  • 0
  • 1
  • Syntax error
  • None of these
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test