Skip to content

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

  1. A
    $\text{num}$ $>65$ || $\text{num}$ $<65$
  2. B
    $!($ num $==65)$
  3. C
    $\text{num}$ $-65$
  4. 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.