What will be the output of the following PHP code (17)?

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

<?php
echo (round(0.49) . "," . round(0.50) . "," . round(0.51));
?>
  1. 0,0,0
  2. 1,1,1
  3. 0,0,1
  4. 0,1,1

Answer: D) 0,1,1

Explanation:

The round() function is used to round a floating-point number to its nearest integer. Thus, the output will be 0,1,1.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.