Sie sind auf Seite 1von 1

La Union Colleges of Science And Technology Inc.

Central West, Bauang, La Union

Prelim Examination – Advance Database Management System (IT-DBMS2)- 8 copies

I. Identification: Write the word(s) that best describe the sentence. 2 pts. Each
1. These are used to determine how one operand compares with another.
2. These are variables and literals contained in an expression.
3. It contains a set of data represented by a single variable name.
4. These are values a program stores in computer memory.
5. It refers to a subroutine that performs a specific task.
6. It is the process of determining the order in which statements execute in a program.
7. This statement tests a condition prior to executing a series of statements at each iteration of the loop.
8. The lines of code that make up a function.
9. It is a control structure that repeatedly executes a statement.
10. This statement s tests a condition after executing a series of statements.

II. Evaluation: Evaluate the value of $x, give the value of $y = 5; $z = -3; $w = 3; 2 pts. each
1. $x = $w % $y * $w + $y;
2. $x = (($y + $z /$w) % 2) - $y * $z;
3. $x = ($z > -2 ? “false” : “true”);
4. $x = ($w <> $z * -1 ? “true” : “false”);
5. $x = ( $w <= $y xor $y >= $w ? “true” : “false”);
6. $x = --$z;

III. Essay: Answer the question briefly but meaningful


1. Give and explain the differences of the three logical operators. 6 pts.
2. Explain how can you access the value of the second element in an array name $sign. 3 pts.
3. Explain the purpose of a counter variable when executing a loop. 5 pts.

IV. Enumeration:
I. What are the four looping structure used in PhP. 4 pts.

V. Program coding: Create a PhP program for the given problem.


1. Create a program that will display the corresponding letter base on a random number from 1 to 10. Use any of
the decision statement. 15 pts.
A – 1 to 3
B – 4 to 6
C – 7 -9
D -10

2. Create a program that will display the name of your instructor base on the random number from 1 to 10. (E.g. if
random no. is 2 display the name 2x, if 5 display name 5x). Use any of the looping statement. 15 pts.

/rcfPrelim2017-18

Das könnte Ihnen auch gefallen