<<< Previous question <<< Question ID#0024.md >>> Next question >>>
Consider the following code:
$x = 0;
$i;
for($i = 0; $i < 5; $i++) {
$x += $i;
}
print($x);
What will be the value of x?
- A) 10
- B) 7
- C) 8
- D) 9
Answer
Answer: A
Consider the following code:
$x = 0;
$i;
for($i = 0; $i < 5; $i++) {
$x += $i;
}
print($x);
What will be the value of x?
Answer: A