OA. free
Free
Palo Alto Networks Core Computer Science Core Computer Science Medium

Question 18 Null and Void are similar.

Palo Alto Networks technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Question 18

Null and Void are similar. Determine above statement as true or false.

Select any one of the following options

Choose one option.
Show answer & explanation
Answer: B. B) FALSE

In C, the comma operator evaluates (1, 0) from left to right and returns the rightmost operand, 0. Since 0 is falsy, the else branch executes.

Step-by-step Derivation:
Step 1: The condition is (1, 0) enclosed in parentheses.
Step 2: The comma operator evaluates 1, discards it, and evaluates 0 as the result.
Step 3: if(0) evaluates to false in C.
Step 4: The else branch is taken, printing 'false' (FALSE).