Vidyalelo
PHP · Q45

Operators And Expressions

Programming · PHP · question 45

Q45

What will be the output of the following PHP code ?

A.
0
B.
1
Answer
C.
2
D.
Error

Answer: Option B

Solution

Answer: Option B
Solution:
% is the modulo operator. Unlike in C we can use it get reminder or floating point numbers in PHP.