Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

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

    <?php

    $x = 10;

    $y = 4;

    $z = 3;

    echo $x % $y % $z;

    ?>

  2. A.

     0

    B.

     1

    C.

     2

    D.

     Error

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The expression is considered as ($x%$y)%z in this case (10%4)%3 which is 2.


Be The First To Comment