Which of the following is not correct in C++?
Show answerHide answer
Correct answer: (C) x% =2; is the same as x = x/2;
Explanation
x %= 2 means x = x % 2 (remainder), not x = x / 2 (division). So (C) is incorrect.
Correct answer: (C) x% =2; is the same as x = x/2;
Explanation
x %= 2 means x = x % 2 (remainder), not x = x / 2 (division). So (C) is incorrect.
This is question 65 of DSSSB TGT Computer Science Practice Set 4. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.