Q23.Marks: +2.0UGC NET Paper 2: Computer Science 8th Oct 2022
The condition num! = 65 cannot be replaced by
1.num > 65 || num < 65
2.!(num = = 65)
3.num − 65
4.!(num − 65)✓ Correct
Solution
option 4 is the correct answer.
The expression !(num - 65) evaluates to true if num is not equal to 65, and false if num is equal to 65.
However, this expression is not equivalent to num! = 65, since the factorial of other numbers besides 65 can also produce the same result as 65.
Options 1 and 3 are also not valid replacements for num! = 65, since they do not check if the factorial of num is equal to 65.
Option 2 is the only option that is equivalent to num! != 65, but it is not the correct answer since the question asks for a replacement that is NOT equivalent to num! = 65.