C - Operators and Expressions Questions and Answers

Practice Mode
Showing 10 of 65 questions
Q21
 the symbol of bitwise OR operator is 
  • A |
  • B ||
  • C !=
  • D >>
Answer: Option A
Q22
 The symbol of left shift  operator is 
  • A <
  • B <<
  • C <=
  • D <<<
Answer: Option B
Q23
&nbsp;The symbol of right shift operator is&nbsp;
  • A <
  • B >>>
  • C >>
  • D >
Answer: Option C
Q24
The bitwise AND &nbsp;is used for&nbsp;
  • A masking
  • B comparison
  • C division
  • D shifting bits
Answer: Option A
Q25
&nbsp;The bitwise OR is used to&nbsp;
  • A set the desired bits to 1
  • B multiply numbers
  • C divide numbers
  • D set the desired bits to 0
Answer: Option A
Q26
Tthe bitwise XOR is used to&nbsp;
  • A complement the desired bits
  • B multiply numbers
  • C divide numbers
  • D set the desired bits to 0
Answer: Option A
Q27
&nbsp;Logical right shift results in&nbsp;
  • A maintaining the leftmost bit value
  • B zero is shifted to the leftmost bit position
  • C one is shifted to the rightmost bit value
  • D zero is shifted to the rightmost position
Answer: Option B
Q28
&nbsp;Arithmetic right shift results in&nbsp;
  • A zero is shifted to the leftmost bit position
  • B one is shifted to the rightmost bit value
  • C maintains the leftmost bit value
  • D zero is shifted to the rightmost bit position
Answer: Option C
Q29
&nbsp;The result of the expression ~~ 7 is&nbsp;
  • A 7
  • B 1
  • C 0
  • D invalid expression
Answer: Option D
Q30
&nbsp;Identify the valid compound assignment.&nbsp;
  • A <<=
  • B >>=
  • C options a and b
  • D >>>=
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test