C - Operators and Expressions Questions and Answers

Practice Mode
Showing 10 of 65 questions
Q51
Which of the following is NOT a bitwise operator ?
  • A &
  • B ^
  • C |
  • D ||
Answer: Option D
Q52
 The type cast operator is 
  • A (type )
  • B cast ( )
  • C //
  • D " "
Answer: Option A
Q53
 Which of the following statements is /are True ? 1. A char data type variable always occupies one byte independent of the system architecture. 2. the size of operator is used to determine the amount of memory occupied by a variable.
  • A both 1 and 2
  • B 1 only
  • C 2 only
  • D neither 1 nor 2
Answer: Option A
Q54
 What might be theminimum value  for the data type int, for 32 bit compiler ?
  • A 0
  • B -2,147, 483, 648
  • C -2, 147, 483, 647
  • D -32768
Answer: Option C
Q55
 If the value of a = 10, and b = -1, thevalue of x after executing thefollowingexpression is  x= (a! = 10), && (b = 1)
  • A 0
  • B 1
  • C -1
  • D none
Answer: Option A
Q56
 what would be the output of the expression 11 ^ 5 ?
  • A 6
  • B 8
  • C 14
  • D 15
Answer: Option C
Q57
 What is the value of x after executing the following statement ? int x = 011 | 0x10;
  • A 13
  • B 19
  • C 25
  • D 27
Answer: Option C
Q58
 What is the function of the modulus operator in most languages ?
  • A Sets a system environmental value toeither base 10, base 8, or base 16.
  • B Returns the first argument raised to the second argument power.
  • C Prints out the actual code written to standard output rather than executing the code
  • D Returns the remainder after dividing one number by another.
Answer: Option D
Q59
 What is the value of x in the sample code below ? double x; x = (2 + 3) * 2 + 3; 
  • A 10
  • B 13
  • C 25
  • D 28
Answer: Option B
Q60
 What value will bestored in z if the following code is executed ? main ( )  { int x = 5, y = -10, z; int a = 4, b = 2; z = x+++++y * b / a; }
  • A -2
  • B 0
  • C 1
  • D 2
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test