C Operators Questions and Answers

Practice Mode
Showing 10 of 122 questions
Q111
Find the output void main ( ) { int a=5, b=6, c=2, d; d=(a++, ++b, c++); printf("%d%d%d",d, a,a c); }
  • A 263
  • B 252
  • C 162
  • D 253
Answer: Option A
Q112
Find the output int x=5; void modify (int); void main ( ) { printf(%d",x); { x=10; modify(x); printf("%d',x); } printf("%d",x); } void modify (x); { x=15; x++; }
  • A 5 10 10
  • B 5 16 16
  • C Compilation error
  • D None of these
Answer: Option A
Q113
Find the output void main ( ) { int a=0; int b=20; char x=1; char y=10; if(x, b--, x--,x++) printf("%d",x); }
  • A 0
  • B 1
  • C 2
  • D None of the above
Answer: Option D
Q114
Find the output void main ( ) { int a=5 b=4, c=10 *((a>b) ? &a:&b)=(a+b>c); printf("%d\t%d", a, b); }
  • A 0 0
  • B 0 4
  • C Compilation error
  • D None of these
Answer: Option B
Q115
Find the output void main ( ) { int i=-3, j=2, k=0, m; m=++i&&++j||++k; printf("\n%d %d %d %d",i,j, k, m); }
  • A -2 3 0 1
  • B -3 2 0 1
  • C -2 3 1 1
  • D Compilation error
Answer: Option A
Q116
Find the output. void main ( ) { int x=10, y=10, z=5, i; i=x<y<z; printf("%d", i); }
  • A 0
  • B 1
  • C 10
  • D 5
Answer: Option B
Q117
Type conversion of small data type to higher data type is known as
  • A Coecion
  • B Type updation
  • C type promotion
  • D None of these
Answer: Option A
Q118
Find the output int define; #define define define+(a&b|c^d) #define define define=(a&b|c^d) void main ( ) { int a=1, b=2, c=3, d=4, e; if (define) printf("%d", define); }
  • A 0
  • B 7
  • C Compiler Error
  • D No Output
Answer: Option B
Q119
Find the output. void main ( ) { int i=4; i=i+1, i++; i=i+1, i+1; printf("%d", i); }
  • A 7
  • B 8
  • C 4
  • D 6
Answer: Option A
Q120
Find the output void main ( ) int c; { int a=5, b=10; c=a+b=-=a; printf("%d %d %d", a, b, c); }
  • A 10 10 5
  • B 5 10 5
  • C 10 5 10
  • D Compilation error
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test