Examveda
Examveda

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 :

Answer: Option C

Solution(By Examveda Team)

Functions returns value 30.

This Question Belongs to PHP >> Functions

Join The Discussion

Related Questions on Functions