adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
function CalAll($x,$y)
{
    echo ($x + $y);
    echo "<br>";
    echo ($x - $y);
    echo "<br>";
    echo ($x * $y);
    echo "<br>";
    echo ($x / $y); 
    echo "<br>";
    echo ($x % $y);
}
$x = 10; 
$y = 6;
CalcAll(); 
?>

a.

4
60
1.6666666666667
4
16

b.

16
4
60
1.6666666666667
4

c.

4
16
4
60
1.6666666666667

d.

1.6666666666667
4
16
4
60

Posted under Functions in PHP PHP

Answer: (b).16
4
60
1.6666666666667
4

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following PHP code ?

Similar Questions

Discover Related MCQs