Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $a = 10;

    $b = 4;

    $c = fun(10,4);

    function fun($a,$b)

    {

    $b = 3;

    return $a - $b + $b - $a;

    }

    echo $a;

    echo $b;

    echo $c;

    ?>

  2. A.

     104

    B.

     410

    C.

     1400

    D.

     4100

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The value returned from the function is 0, and value of a is 10, value of b is 4 and c is 0.


Be The First To Comment