0% found this document useful (0 votes)
38 views3 pages

Final Exam

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views3 pages

Final Exam

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Holy Trinity College of Gen.

Santos City Exam


May 28, 2021
First Semester of SY 2019 – 2020 Date:

OBJECT ORRIENTED PROGRAMMING [OOP] Time: 9:30 –11:30 AM

Second Term - Final Examination Room:

Teacher: Ryan T. Tuyan Page: 1 of 1

General Instructions: No Permit – No Exam | Write your answers on the booklet provided. | Follow the given
instructions below and do not write anything on the Test Questionnaire.

I. Choose or supply the correct answer for the following. (2 pts each)

1. Which of the following code snippet corrects represents a an indexed array? (2 pts each)

a) $ arr[3]=array("a","b",c");

b) $arr= new array("a","b","c");

c) $arr= array("a"=>"0","b"=>"1","c"=>"2");

d) $arr=array("a","b","c");

2. Which of the following built-in function is used for starting a PHP session? (2 pts each)

a) open_session()

b) session_start()

c) set_session()

d) create_session()

3. What will be the correct output against the following code snippet ? (2 pts each)

<?php $a=7;

do{

echo " value is $a";

$a ;

}while($a<=5);

?>

4. Which of the following is true? (2 pts each)

a) You can use define to declare a constant

b) Php allows both indexes and associative arrays

c) $GLOBALS is where all the global variables are stored

“Go and Spread the Goodness of a TRINITARIAN”


Holy Trinity College of Gen. Santos City Exam
May 28, 2021
First Semester of SY 2019 – 2020 Date:

OBJECT ORRIENTED PROGRAMMING [OOP] Time: 9:30 –11:30 AM

Second Term - Final Examination Room:

Teacher: Ryan T. Tuyan Page: 1 of 1

d) All of the above

5. Create the correct syntax in displaying the word php on a browser. (3 pts each)

6. Which of the following built-in function is used in php to get the length of the array? (2 pts each)

a) contents()

b) length()

c) size()

d) count()

7. Tags for encapsuling a php code. (2 pts each)

8. What will be the correct output against the following code snippet? (2 pts each)

<?php

$x=2;

$y=6;

echo "hello".$x+$y;

?>

9. Which of the following built-in function is used for creating the cookies in PHP? (2 pts each)

a) cookie_start()

b) getcookie()

c) setcookie()

d) createcookie()

10. Discuss 3 superglobals that is available in PHP. (6 pts each)

11. Initialize a variable with a value of modulus of 2 variables. (5 pts each)

12. What is used for adding the other php file in an existing php file. (2 pts each)

13. Create a function that will calculate the fourthroot of a number. (5 pts each)

14. Write a syntax that connects a sample.php file to your front page. (3 pts each)

15. PHP is an alternative to what programming language? (2 pts each)

“Go and Spread the Goodness of a TRINITARIAN”


Holy Trinity College of Gen. Santos City Exam
May 28, 2021
First Semester of SY 2019 – 2020 Date:

OBJECT ORRIENTED PROGRAMMING [OOP] Time: 9:30 –11:30 AM

Second Term - Final Examination Room:

Teacher: Ryan T. Tuyan Page: 1 of 1

16. PHP stands for _______. (2 pts each)

17. What’s the difference of a GET method from POST method? (2 pts each)

18. How to select a database in PHP? (5 pts each)

19. Give 5 logical operators and its usage. (10 pts each)

20. What is a value of a variable that can be only used inside a functions? (2 pts each)

II. Design the following according the given format. (5 pts each)

1. Make a span element bold.


2. Add any comment in CSS.
3. Change the text color of label into red
4. Create an ID called header style which has a width of 750px, a height of 30px and the color of the text is
black?
5. Remove a bullet in an unordered list.
6. Import a stylesheet in your CSS.
7. Make a label all capitalized using CSS.
8. How do you insert padding so that it is:
- 10 pixels at the top
- 15 pixels at the bottom
- 5 pixels at the right
- 10 pixels to the left?
9. Change the background color of the class “sample”.
10. Remove the underline in hyperlink.

III. Coding answer only 1. (30 points)

1. Create a login page.


2. Create a signup form.
3. Create a calculator.

“Go and Spread the Goodness of a TRINITARIAN”

You might also like