ExamVeda
Login
Home
Operators and Expressions in php
?

What will be the output of the following PHP code ?
<?php
$i = 1;
if ($i++ && ($i == 1))
    printf("Yesn$i");
else
    printf("Non$i");
?>

Answer & Solution
Correct Answer: Option A
The first condition returns true and increments but the second condition is false.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.