Home » PHP » PHP Functions » Question
  1. What will be the output of the following PHP code ?
    <?php
    function Calculate($p,$q)
    {
    echo ($p + $q);
    echo "\n";
    echo ($p - $q);
    echo "\n";
    echo ($p * $q);
    echo "\n";
    echo ($p / $q);
    echo "\n";
    echo ($p % $q);
    }
    Calculate(20,16);
    ?>
    1. 36
      4
      320
      1.25
      4
    2. 4
      320
      1.25
      4
    3. 320
      1.25
      4
      4
      36
    4. Error
    5. None of these
Correct Option: A

Simple usage of all arithmetic operators.



Your comments will be displayed only after manual approval.