IP_mock_exam___ca_test_2_revised_mcqs
,1. Single line comments in PHP are
Select one:
a. /* */
b. //
c. /*
d. <!-- -->
2. Which statement is not true about PHP?
Select one:
a. PHP is used to make websites dynamic and interactive
b. PHP is a server side scripting language
c. PHP code can be imbedded within HTML code
d. PHP is a client side scripting language
3. Which of the following is not true?
Select one:
a. PHP cannot be embedded into html
b. PHP makes a website dynamic.
c. PHP can be used to develop web applications.
d. PHP applications cannot be compiled.
4. What should be the correct syntax to write a PHP code?
Select one:
a. < php >
b. <?php ?>
,c. <? php ?>
d. <? ?>
5. PHP code is directly embedded into XHTML document?
Select one:
a. False
b. True
6. In PHP each statement must end with _____________
Select one:
a. /(slash)
b. :(colon)
c. .(dot)
d. ;(semi-colon)
7. PHP can run on different platforms e.g. Windows and Linux
Select one:
a. False
b. True
8. You can use HTML tags within an echo string?
Select one:
a. True
b. False
9. Which option does not apply to the php.ini file?
Select one:
a. The php.ini file can be used to set the folder and cookie settings
b. The php.ini file is read by the PHP engine when PHP starts
, c. The php.ini file can be used to specify the maximum size of files that a user can upload
d. The php.ini file is used to close all internet connections
10. Trace the false statement from the following
Select one:
a. For the inclusion of remote files the allow-url-pope must be enabled ad URL wrapper must
be supported
b. Including a file produces the same result as copying the data from the file specified into
the location in which the statement appears.
c. Any code found within an included file will inherit the variable scope of the location of its
caller
d. Because the included code will be embedded in a PHP execution block, the PHP execution
block, the PHP escape tags (<?php?> aren’t required on the file to be included.
11. What does the PHP interpreter do?
Select one:
a. It creates connection between ISP and Server
b. It processes the HTML and PHP files
c. All of the options
d. It translates User language to System Language
12. What will be the output of the following PHP code ?
<?php
/*
echo "Hello world";
*/
?>
,1. Single line comments in PHP are
Select one:
a. /* */
b. //
c. /*
d. <!-- -->
2. Which statement is not true about PHP?
Select one:
a. PHP is used to make websites dynamic and interactive
b. PHP is a server side scripting language
c. PHP code can be imbedded within HTML code
d. PHP is a client side scripting language
3. Which of the following is not true?
Select one:
a. PHP cannot be embedded into html
b. PHP makes a website dynamic.
c. PHP can be used to develop web applications.
d. PHP applications cannot be compiled.
4. What should be the correct syntax to write a PHP code?
Select one:
a. < php >
b. <?php ?>
,c. <? php ?>
d. <? ?>
5. PHP code is directly embedded into XHTML document?
Select one:
a. False
b. True
6. In PHP each statement must end with _____________
Select one:
a. /(slash)
b. :(colon)
c. .(dot)
d. ;(semi-colon)
7. PHP can run on different platforms e.g. Windows and Linux
Select one:
a. False
b. True
8. You can use HTML tags within an echo string?
Select one:
a. True
b. False
9. Which option does not apply to the php.ini file?
Select one:
a. The php.ini file can be used to set the folder and cookie settings
b. The php.ini file is read by the PHP engine when PHP starts
, c. The php.ini file can be used to specify the maximum size of files that a user can upload
d. The php.ini file is used to close all internet connections
10. Trace the false statement from the following
Select one:
a. For the inclusion of remote files the allow-url-pope must be enabled ad URL wrapper must
be supported
b. Including a file produces the same result as copying the data from the file specified into
the location in which the statement appears.
c. Any code found within an included file will inherit the variable scope of the location of its
caller
d. Because the included code will be embedded in a PHP execution block, the PHP execution
block, the PHP escape tags (<?php?> aren’t required on the file to be included.
11. What does the PHP interpreter do?
Select one:
a. It creates connection between ISP and Server
b. It processes the HTML and PHP files
c. All of the options
d. It translates User language to System Language
12. What will be the output of the following PHP code ?
<?php
/*
echo "Hello world";
*/
?>