UGC NET CS 2022Programming Languages and Computer Graphics › Programming in CVerified
UGC NET CS 2022 PYQ: The condition $\text{num}!$ $=65$ cannot be replaced by
The condition $\text{num}!$ $=65$ cannot be replaced by
- A$\text{num}$ $>65$ || $\text{num}$ $<65$
- B$!($ num $==65)$
- C$\text{num}$ $-65$
- D$! (\text{num}-65)$Correct answer
Answer
(D) $! (\text{num}-65)$
Approach
Compare each candidate expression's truth value with the original condition num != 65, using C's rule that zero is false and nonzero is true.
Reviewed by UGC IQ Editorial Team.