ExamVeda
Login
Home
Operators and Expressions in php
?

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;
?>

Answer & Solution
Correct Answer: Option A
1&&0||1 is evaluated to 1 and the a is also preincremented to 6.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.