C Operators Questions and Answers

Practice Mode
Showing 10 of 122 questions
Q11
Find the output void main ( ) { unsigned int x=~5; print 9"%u", x); }
  • A 5
  • B 4
  • C 2
  • D 65530
Answer: Option D
Q12
Find the outpu void main ( ) int x=10; printf("%d", clculate (x++, ++x, x++); } calculate (int x, int y, int z) { return (x+y+z); }
  • A 31
  • B 33
  • C 34
  • D None of these
Answer: Option C
Q13
Find the output void main ( ) { int x, y=6; x=y>x ||++y; printf("%d %d', x, y); }
  • A 1 7
  • B 0 7
  • C 1 6
  • D None of these
Answer: Option C
Q14
which operator is used to complement a number ?
  • A | operator
  • B ^ operator
  • C & operator
  • D Both a and b
Answer: Option B
Q15
Find the outpu void main( ) { int x=+17>>2; printf(%d', x); }
  • A -3
  • B 3
  • C -5
  • D 7
Answer: Option C
Q16
If both are operands of /are integers then the fractional part of the quotient is
  • A tounded
  • B Truncated
  • C Overflow
  • D None of these
Answer: Option B
Q17
Coercion refers as :
  • A Conversion of derived data types to scalar data types
  • B Conversion of desired data types to scalar data types
  • C Conversion of scalar data typesto derived data types
  • D Conversion of scalar data types to desired data types
Answer: Option C
Q18
how to check numeric key is on/off it char far *p=0x417
  • A *p&64==64
  • B 8p&32==32
  • C *p^64==64
  • D *p|32==32
Answer: Option B
Q19
When a cast operator (short signed int) applied to signed int but the range of signed int does not fit in range of short signed int then the result is:
  • A Conditional defined
  • B Implementation defined
  • C Logical defined
  • D Syntax error
Answer: Option B
Q20
what will be the value of 'x' after execution of the following program? void main ( ) { int x=!0*20; }
  • A 10
  • B 20
  • C 1
  • D 0
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test