C - Operators and Expressions Questions and Answers
Practice ModeShowing 10 of 65 questions
Q61
Which of the following expressions will correctly swap two integers without using a temporary variable ?
Answer: Option C
Q62
What is the correct and fully portable way to obtain the most significant byte of an unsigned integer x ?
Answer: Option D
Q63
What is the value of the following expression ?
i = 1;
i << 1 %2
Answer: Option A
Q64
For the following statements find the values generated for p and q ?
int p = 0, q = 1;
p = q++;
p = ++q
p = q--;
p = - - q;
The value of p and q are
Answer: Option A
Q65
Which of the following is a better approach to do the operation i = i * 16;?
Answer: Option B