Choose The Correct Answers<\/span><\/p>\nQuestion 1.
\nWhat does PHP stand for?
\na) Personal Home Page
\nb) Hypertext Preprocessor
\nc) Pretext Hypertext Processor
\nd) Pre-processor Home Page
\nAnswer:
\nb) Hypertext Preprocessor<\/p>\n
<\/p>\n
Question 2.
\nWhat does PHP files have a default file extension?
\na) .html
\nb) .xml
\nc) .php
\nd) .ph
\nAnswer:
\nc) .php<\/p>\n
Question 3.
\nA PHP script should start with………….. and end with …………….
\na) <php>
\nb) < ? php ?>
\nc) < ? ? >
\nd) < ?php ? >
\nAnswer:
\nb) < ? php ?><\/p>\n
Question 4.
\nWhich of the following must be installed on your computer so as to run PHP script?
\na) Adobe
\nb) windows
\nc) Apache
\nd) IIS
\nAnswer:
\nc) Apache<\/p>\n
<\/p>\n
Question 5.
\nWe can use to ………… comment a single line?
\ni) \/?
\nii) \/\/
\niii) #
\niv) \/* *\/
\na) Only (ii)
\nb) (i), (iii) and (iv)
\nc) (ii), (iii) and (iv)
\nd) Both (ii) and (iv)
\ne) Both (ii) and (iii)
\nAnswer:
\ne) Both (ii) and (iii)<\/p>\n
Question 6.
\nWhich of the following PHP statement\/statements will store 41 in variable num?
\n(i) $x = 41;
\n(ii) $x = ’41’;
\n(iii) (i) $x = “41”;
\na) Both (i) and (ii)
\nb) All of the mentioned,
\nc) Only (iii)
\nd) Only (i)
\nAnswer:
\nd) Only (i)<\/p>\n
<\/p>\n
Question 7.
\nWhat will be the output of the following PHP code?
\n<?php
\n$num = 1;
\n$num1 = 2;
\nprint $num . \u201c+\u2018 $numl ;
\na) 3
\nb) 1+2
\nc) 1.+.2
\nd) Error
\nAnswer:
\nc) 1.+.2<\/p>\n
Question 8.
\nWhich of the following PHP statements will output Hello World on the screen?
\na) echo (“Hello World”);
\nb) print (“Hello
\nWorld”);
\nc) printf (“Hello World”);
\nd) sprintf (“Hello
\nWorld”);
\nAnswer:
\na) echo (“Hello World”);<\/p>\n
Question 9.
\nWhich statement will output $x on the screen?
\na) echo “\\$x”;
\nb) echo “$$x”;
\nc) echo “\/$x”;
\nd) echo “$x;
\nAnswer:
\nb) echo “$$x”;<\/p>\n
<\/p>\n
Question 10.
\nWhich of the below symbols is a newline character?
\na) \\r
\nb) \\n
\nc) \/n
\nd) \/r
\nAnswer:
\na) \\r<\/p>\n
Part II<\/span><\/p>\nShort Answers<\/span><\/p>\nQuestion 1.
\nWhat are the common usages of PHP?
\nAnswer:<\/p>\n