C Operators Questions and Answers

Practice Mode
Showing 10 of 122 questions
Q61
Find the output void main ( ) { int a=2; printf("%d%d%d', a++, ++a, a); }
  • A 2 3 4
  • B 3 4 5
  • C 3 3 2
  • D 4 3 2
Answer: Option C
Q62
Find the output. void main (  ) { int a=1, b; b=+-+a+-a; printf("%d', b); }
  • A 0
  • B 2
  • C -2
  • D None of these
Answer: Option C
Q63
The correct order of evaluation for the expression a||!b && c is
  • A !b, !b &&c, a|| (!b&&c)
  • B b&&c, !(b&&c), a|| (!b&&c))
  • C !b, a|| !b) &&c
  • D a, a || (!b&&c), !b, (!b&&c)
Answer: Option D
Q64
Find the out void main ( ) { int a, b=0, c=10; if (c=a==b) printf("true"); else printf("false"); }
  • A true
  • B false
  • C Compilation error
  • D None of these
Answer: Option B
Q65
Find the output void main ( ) { int a=5; a=a-~a +1; printf ("%d", a); }
  • A 1
  • B -5
  • C 0
  • D None of these
Answer: Option D
Q66
Find the output void main ( ) int x=11, y=5, z=2; x%=y*=; printf("%d",x); }
  • A 2
  • B 1
  • C 25
  • D 27
Answer: Option B
Q67
Find the output void main ( ) int a=5; b; b=(a-=5) && (a+=5); printf("%d", a); }
  • A 5
  • B 0
  • C 10
  • D None of these
Answer: Option B
Q68
Find the output void main ( ) { int i=3, j=5; i++; if(i==--j) break; else printf("continue"); printf("%d",j); }
  • A Continue4
  • B No output
  • C Compilation error
  • D None of these
Answer: Option C
Q69
Find the output void main ( ) { int a=2, b; b=a+*++a*a++; printf("%d",b); }
  • A 27
  • B 64
  • C 48
  • D None of these
Answer: Option A
Q70
What is the value of x ifa=b=c=1 x=--a ||++b*(3-1)/2&&b*l(--c/3)
  • A 0
  • B 1
  • C Syntax error
  • D None of these
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test