nerdexam
CIW

1D0-437 · Question #91

Consider the following program code: 1.$x = 100; 2.$y = 15; 3.$result = $x % $y; 4. 5.print$result; What is the result of executing this program code?

The correct answer is C. The code will output the following. See the full explanation below for the reasoning.

Question

Consider the following program code:

1.$x = 100; 2.$y = 15; 3.$result = $x % $y; 4. 5.print$result; What is the result of executing this program code?

Options

  • AThe code will fail at line 3 because % is a unary operator.
  • BThe code will output the following:
  • CThe code will output the following:
  • DThe code will fail at line 5 because $result is not enclosed by parentheses.

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    79% (27)
  • D
    12% (4)

Community Discussion

No community discussion yet for this question.

Full 1D0-437 Practice