?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$a = 5; $b = -7; $c =0;
$d = ++$a && ++$b || ++$c;
print $d; print $a;
?>
<?php
$a = 5; $b = -7; $c =0;
$d = ++$a && ++$b || ++$c;
print $d; print $a;
?>
Answer & Solution
Correct Answer:
Option
A
1&&0||1 is evaluated to 1 and the a is also preincremented to 6.
Join the Discussion
Login to post a comment or share your explanation.
Login