adplus-dvertising

Welcome to the PHP Controls Structures MCQs Page

Dive deep into the fascinating world of PHP Controls Structures with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of PHP Controls Structures, a crucial aspect of PHP. In this section, you will encounter a diverse range of MCQs that cover various aspects of PHP Controls Structures, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within PHP.

frame-decoration

Check out the MCQs below to embark on an enriching journey through PHP Controls Structures. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of PHP.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of PHP Controls Structures. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

PHP Controls Structures MCQs | Page 4 of 11

Explore more Topics under PHP

Q31.
What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 20;
if ($x > $y && 1||1)
    print "hi" ;
else
    print "how are u";
?><?php
if (-100)
    print "hi" ;
else
    print "how are u";
?>
Discuss
Answer: (b).hi
Q32.
What will be the output of the following PHP code ?
<?php
if (0.1)
    print "hi" ;
else
    print "how are u";
?>
Discuss
Answer: (b).hi
Q33.
What will be the output of the following PHP code ?
<?php
if (0.0)
    print "hi" ;
else
    print "how are u";
?>
a) how are u
Discuss
Answer: (a).how are u
Q34.
What will be the output of the following PHP code ?
<?php
if (print "0")
    print "hi" ;
else
    print "how are u";
?>
Discuss
Answer: (b).0hi
Q35.
What will be the output of the following PHP code ?
<?php
$x = 1;
if ($x == 2)
    print "hi" ;
else if($x = 2)
    print $x;
else
    print "how are u";
?>
Discuss
Answer: (b).2
Q36.
What will be the output of the following PHP code ?
<?php
$x = 1;
if ($x = $x&0)
    print $x ;
else
    print "how are u";
?>
Discuss
Answer: (d).how are u
Q37.
What will be the output of the following PHP code ?
<?php
$x = 1;
if ($x = $x&0)
    print $x ;
else
    print "how are u";
?><?php
$x = 1;
if ($x = $x&0)
    print $x;
else
    break;
?>
Discuss
Answer: (c).error
Q38.
What will be the output of the following PHP code ?
<?php
$a = 100;
if ($a > 10)
    printf("M.S. Dhoni");
else if ($a > 20)
    printf("M.E.K Hussey");
else if($a > 30)
    printf("A.B. de villiers");
?>
Discuss
Answer: (a).M.S.Dhoni
Q39.
What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 5;
$z = 3;
if ($x / $y / $z)
    print "hi";
else
    print "hello";
?>
Discuss
Answer: (a).hi
Q40.
What will be the output of the following PHP code ?
<?php
if (!print "hi")
    if (print "hello")
print "hi";
?>
Discuss
Answer: (a).hi

Suggested Topics

Are you eager to expand your knowledge beyond PHP? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!