Final Examx - caylex.ca

handsgridServers

Dec 4, 2013 (3 years and 8 months ago)

805 views

Final Exam

Important:
Please note that we do not use your quiz scores to determine your eligibility for a completion letter or to measure your
success in meeting the objectives of this course. Our assessment of your performance in this course will rely exclusively on
your final

exam score. In order to obtain the highest possible score on the final exam, we strongly recommend that you make sure you hav
e
taken and passed every quiz. We also recommend that you print and review a copy of the final exam before you actually take th
e e
xam.

This is a multiple
-
choice test. Please use your mouse to click the small round option button preceding the
best
answer to each
question. Then, use the scroll bar on the right side of your screen to scroll down to the next question. Repeat as needed u
ntil you have
answered all questions. Then, click the small gray 'Submit' button at the bottom of this page.

Please review your selections before submitting. You may only submit your final exam answers once. In order to qualify for th
e Letter of
Completio
n, you'll need to successfully complete the final exam with a score of
65%

or higher. Within 1
-
2 minutes, you will receive an
evaluation of your answers.


1.

What type of Web page is used to present frequently changing information to visitors?

Static.

S
erver
-
side.

Dynamic.

Client
-
side.


2.

What Open Source Web server is used to implement a WAMP server?

The Microsoft IIS server.

The Apache server.

The MySQL server.

Linux.


3.

What is a key element for maintaining data in a content management sys
tem?

A graphical development tool.

A back
-
end database.

Server
-
side scripting language.

An Open Source operating system.


4.

Which variable is a valid PHP variable name?

$1stdate

$date
-
1st

$old#1date

$my1stdate


5.

In PHP, what indicates the end of a statement?

The end of the text line.

A semicolon.

A ?> character combination.

A /> ending HTML tag.


6.

What does the incrementor operator in PHP do?

Multiplies two variables together.

Adds two string values together.

Adds 1 to an existing PHP variable value.

Subtracts 1 from an existing PHP variable value.


7.

How do you group multiple PHP statements that are controlled by a single if
-
then statement?

Place a set of parentheses around them.

Put blank lines around them.

Put square brackets around them.

Place a set of braces around them.


8.

In PHP what statement allows you to create a loop using just one statement?

The while statement.

The for s
tatement.

The if
-
then statement.

The if
-
then
-
else statement.


9.

What is the difference between the include() and require() functions?

An include() function copies the code from the specified file into the main program while the require() function
doe
sn't.

A require() function imports variables, while the include() function doesn't.

The PHP program will stop if a require() function fails.

An include() function imports variables, while the require() function doesn't.


10.

What is the lowest level of

data in MySQL?

Database.

Table.

MySQL server.

Data field.


11.

If you want to create a data field for holding a large amount of text, which data type would be best to use?

Bool.

Char.

Text.

Varchar.


12.

What privilege group should you modify to assign a user to only view data into a table?

Structure privileges.

Data privileges.

Administration privileges.

You can't assign a user to only view data in a table.


13.

What CSS feature allows you to size s
ections on a Web page so that they automatically resize when the browser
window is resized?

Golden ratio.

Fixed
-
width.

Liquid layout.

Grid theory.


14.

Which PHP array variable can retrieve an HTML variable using any method?

$_REQUEST

$_COOKIE[]

$_GET[]

$_POST[]


15.

How can you override styles defined for an HTML element in an internal style sheet?

Set the attributes in the html tag.

Set attributes in an external style sheet.

Set the attributes within the HTML element tag.

Set attributes in the client browser.


16.

In the SQL statement 'SELECT recipeid, title FROM recipes', the table name
recipes

is what type of SQL element?

An identifier.

A modifier.

A literal.

A keyword.


17.

Which PHP function provides the number of da
ta records returned by a query?

mysql_select_db()

mysql_query()

mysql_num_rows()

mysql_fetch_array()


18.

What MySQL function should you use to retrieve a total number of data records in a result set?

mysql_num_rows()

every()

count()

sum()


19.

What permissions does the MySQL server use when you perform an INSERT statement using the mysql_query()
function?

The permissions of the user's workstation account.

The permissions of the table owner.

The permissions of the user account specified in

the mysql_connect() function.

The permissions of the user account that's running the Apache service.


20.

What HTML form control provides a multi
-
line textbox, which allows you to easily enter large amounts of text?

The textarea control.

The text cont
rol.

The hidden control.

The file control.


21.

What PHP function should you use to remove HTML codes from text entered in an HTML form?

trim()

htmlspecialchars()

ltrim()

nl2br()


22.

How would you write a WHERE clause to search for both the words 'tuna' and 'fish' anywhere in a data field?

WHERE title LIKE 'tuna' AND title LIKE 'fish'

WHERE title LIKE 'tuna%fish'

WHERE title LIKE '%tuna%' AND title LIKE '%fish%'

WHERE title LIKE 'tuna fish'


23.

What PHP function should you use to store words from a single string into an array variable?

explode()

htmlspecialchars()

nl2br()

implode()


24.

What type of search should you perform to look for a single word within a

long text string?

A string match.

A numeric match.

An exact match.

An inexact match.


25.

What does the target="_blank" attribute do in the HTML
a

tag?

Instruct the Web browser to display a Web page link in a new window.

Instruct the Web browser to blank out the current Web page link.

Instruct the Web browser to display the Web page link in the parent window.

Erase the current Web page.


26.

What line of code would you use in a CSS style sheet property to set the text in

the body of a Web page to a serif
Times New Roman font?

font
-
family: "Times New Roman", serif

font
-
style: "Times New Roman", serif

font
-
family: serif, "Times New Roman"

font
-
family: "Times New Roman", 12pt.


27.

What elements do serif fonts include
that sans
-
serif fonts don't?

Structural elements of characters.

Nonstructural elements of characters.

Bold characters.

Italic characters.


28.

Why is it a bad idea to use the HTML GET method for passing a userid and password between Web pages?

The
GET method can only pass one variable data value at a time.

HTML variables passed using the GET method can't be retrieved using PHP code.

The GET method passes variables and data directly in the URL, which is visible and not secure.

The GET method do
esn't allow passing text data, only numeric data.


29.

How can you tell whether a specific session cookie variable has been set in a Web page?

Use the $_GET[] array variable to check the session cookie value.

Use the isset() PHP function to check the $_SESSION[] array variable containing the desired cookie variable.

Use the $_POST[] array variable to check the session cookie value.

Use the session_start() PHP function.


30.

How would you create a session cookie array variable called myname and assign it a value of fred?

$_SESSION['myname'] = "fred"

$_SESSION['fred'] = myname

myname = $_SESSION['fred']

fred = $_SESSION['myname']


31.

Where does MySQL store information ab
out various options you've set for a database?

The db.opt file.

The ib_logfile0 file.

The tablename.frm file.

The InnoDB tablespace file.


32.

What does the InnoDB storage engine binary log file contain?

MySQL table information.

SQL statements th
at don't modify database data.

SQL statements that modify database data.

Table data.


33.

Which command line program can you use to export data from your database?

mysql.exe

mysqldump.exe

apache.exe

phpMyAdmin.exe


34.

What SELECT statement feature is used to implement paging in a Web application by restricting the number of data
records returned?

WHERE

ORDER BY

LIMIT

FROM


35.

In a 30 record result set, if the LIMIT clause is set to LIMIT 20,10, how many records w
ill the query return?

9.

10.

30.

20.


36.

What is the result of the PHP function ceil(3.2)?

3.

2.

3.2.

4.