adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code?
<?php
    function sum($num1, $num2)
    {
        $total = $num1 + $num2;
        echo "cos($total)"; 
    }
    sum(5,-5);    
?>

a.

0

b.

1

c.

0.5

d.

-0.5

Posted under PHP

Answer: (b).1

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