nerdexam
Zend

200-550 · Question #159

What is the output of the following code? for ($i = 0; $i < 1.02; $i += 0.17) { $a[$i] = $i; } echo count($a);

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

Question

What is the output of the following code? for ($i = 0; $i < 1.02; $i += 0.17) { $a[$i] = $i; } echo count($a);

Options

  • A0
  • B1
  • C2
  • D6
  • E7

How the community answered

(45 responses)
  • A
    4% (2)
  • B
    78% (35)
  • C
    2% (1)
  • D
    2% (1)
  • E
    13% (6)

Community Discussion

No community discussion yet for this question.

Full 200-550 Practice