nerdexam
CIW

1D0-437 · Question #85

Consider the following program code: $val = 5; if ($val++ == 6) { print("True "); } else { print("False "); } if ($val++ == 6) { print("True "); } else { print("False "); } What is the output of…

The correct answer is B. False True. See the full explanation below for the reasoning.

Question

Consider the following program code:

$val = 5; if ($val++ == 6) { print("True "); } else { print("False "); } if ($val++ == 6) { print("True "); } else { print("False "); } What is the output of this code?

Options

  • AFalseFalse
  • BFalse True
  • CTrue False
  • DTrueTrue

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    77% (20)
  • C
    8% (2)
  • D
    12% (3)

Community Discussion

No community discussion yet for this question.

Full 1D0-437 Practice