adplus-dvertising
frame-decoration

Question

What will be the output of the following PHP code ?
<?php
function addFunction($num1, $num2)
{
    $sum = $num1 + $num2;
    return $sum;
}
$return_value = addFunction(10, 20);
echo "Returned value from the function : " .$return_value
?>

a.

Returned value from the function : $return_value

b.

Error

c.

Returned value from the function : 30

d.

Returned value from the function :

Posted under PHP

Answer: (c).Returned value from the function : 30

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