C Operators Questions and Answers

Practice Mode
Showing 10 of 122 questions
Q21
Find the outpu void main ( ) { int i=5; if (i++ -1) { printf("%d", i); printf("%Hello"); } }
  • A 1Hello
  • B 1hi
  • C 6hello
  • D 0Hi
Answer: Option C
Q22
Find the output void main ( ) { int x=5; printf("%d%d", x++,x++,x++); }
  • A 5 6 7
  • B 7 6 5
  • C 6 7 8
  • D None of these
Answer: Option B
Q23
The operators[] . and -> are known as
  • A Data access operators
  • B Structure access operators
  • C Member access operators
  • D None of these
Answer: Option A
Q24
Find the output void main ( ) { int x=2; printf("%d',++x++); printf("%d', x++); }
  • A 3 4
  • B 3 5
  • C 4 3
  • D Compilation error
Answer: Option D
Q25
Find the output void call (int); void main ( ) { call (3); } void call (int a) { if (a<6) call (++a); printf ("%d", a); }
  • A 4 5 6
  • B 6 5 4 3
  • C 6 6 5 4
  • D 5 5 4
Answer: Option C
Q26
The order of evaluation of operators having same precedence is decided by
  • A associativity rule
  • B Precedence rule
  • C Left-right rule
  • D Right-left rule
Answer: Option A
Q27
Find the output void main ( ) { int x=1; printf("%d==1 is "'%s", k, k==1 ? 'TRUE": "FALSE"); }
  • A 0==1 is FALSE
  • B 1==1 is TRUE
  • C Compilation error
  • D Garbage Output
Answer: Option B
Q28
Find the output void main ( ) { printf("%*d", 10, 15); }
  • A *15
  • B *10
  • C 15 on column 10
  • D 10 on column 15
Answer: Option C
Q29
Find the output void main ( ) int i=5; i= i++ - --i + ++i; printf("%d", i); }
  • A 5
  • B 7
  • C 8
  • D None of these
Answer: Option D
Q30
Find the output void main ( ) { int a=7; a+=a+=a-=6; printf("%d",a); }
  • A 15
  • B 4
  • C 11
  • D 3
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test