Vidyalelo
PHP · Q27

Control Structures(Loop In PHP)

Programming · PHP · question 27

Q27

What will be the output of the following PHP code ?

A.
hi
Answer
B.
hello
C.
error
D.
no output

Answer: Option A

Solution

Answer: Option A
Solution:
The operator precedence of ++ is higher than <,thus the incremenrt happens first and then compared.