COMPUTER SCIENCE DEPARTMENT FEDERAL POLYTECHNIC BIDA
Name: Oladoke Simeon Temitope
Number: 2021/142743CS
1 Apr 2023 - 09:15PM
SCORE
Correct 66.7% 20
20
Wrong 33.3% 10 67%
30
Skipped 0% 0
Note: This score is not final
1. PHP stands for ------
Hypertext Preprocessor
1/1 Marks
2. Who is known as the father of PHP?
Rasmus Lerdrof
1/1 Marks
3. Variable name in PHP starts with -
$ (Dollar)
1/1 Marks
4. Which of the following is the default file extension of PHP?
.php
1/1 Marks
5. Which of the following is not a variable scope in PHP?
Extern
1/1 Marks
6. Which of the following is correct to add a comment in php?
Both (b) and (c)
1/1 Marks
7. Which of the following is used to display the output in PHP?
Both (a) and (c)
0/1 Marks
8. Which of the following is the use of strlen() function in PHP?
The strlen() function returns the length of string
1/1 Marks
9. Which of the following is used for concatenation in PHP?
+ (plus)
0/1 Marks
10. Which of the following starts with __ (double underscore) in
PHP?
Inbuilt constants
0/1 Marks
11. What does PEAR stands for?
PHP extension and application repository
1/1 Marks
12. Which of the following is the correct way to create a function
in PHP?
function myFunction()
1/1 Marks
13. Which of the following PHP function is used to generate
unique id?
id()
0/1 Marks
14. Which of the following is the correct way of defining a variable
in PHP?
$variable_name = value;
1/1 Marks
15. What is the use of fopen() function in PHP?
The fopen() function is used to open folders in PHP
0/1 Marks
16. What is the use of isset() function in PHP?
The isset() function is used to check whether variable is set or not
1/1 Marks
17. Which of the following is the correct way to open the file
"sample.txt" as readable?
fopen("sample.txt", "r");
1/1 Marks
18. Which of the following function displays the information about
PHP and its configuration?
phpinfo()
1/1 Marks
19. Which of the following function is used to find files in PHP?
file()
0/1 Marks
20. Which of the following function is used to set cookie in PHP?
setcookie()
1/1 Marks
21. Which of the following function is used to get the ASCII value
of a character in PHP?
ascii()
0/1 Marks
22. Which of the following function is used to unset a variable in
PHP?
unset()
1/1 Marks
23. Which of the following is/are the code editors in PHP?
All of the above
1/1 Marks
24. Which of the following is used to end a statement in PHP?
; (semicolon)
1/1 Marks
25. What will be the output of the following program? <?php
echo "Welcome " , "to " , "Computer " , "Science ". "Department" ;
?>
Welcome to Computer Science Department
1/1 Marks
26. What will be the output of the following program? <?php
$var1 = "Hello"; $var2 = "World"; echo $var1, $var2; ?>
HelloWorld
1/1 Marks
27. What will be the output of the following program? <?php
$var1 = "Hello"; $var2 = "World"; echo "$var1$var2"; ?>
HelloWorld
1/1 Marks
28. What will be the output of the following program? <?php
$a; if ($a) { echo "hi"; } else { echo "How are you"; } ?>
Hi How are you
0/1 Marks
29. What will be the output of the following program? <?php
$a = 0; while ($a++) { echo "$a"; } echo $a; ?>
0
0/1 Marks
30. What will be the output of the following program? <?php
$a = 15; function show() { $a = 20; echo "$a"; } show();
echo "$a"; ?>
2020
0/1 Marks
Powered by SurveyHeart