Web Development College Quiz 2

Question 1

True or False: Apache is called httpd on a Linux server.

Select one:

  • True
  • False

The correct answer is 'True'.


Question 2

What is the most common extension for a source code package?

Select one:

  • a. .zip
  • b. .tgz
  • c. .txt
  • d. .os

The correct answer is: .tgz


Question 3

What command extracts a tarball archive file?

Select one:

  • a. tar -xzvf
  • b. tar -czvf
  • c. tar -out
  • d. tar -v

The correct answer is: tar -xzvf

Question 4

What does PHP stand for?

Select one:

  • a. PHP: Hypertext Preprocessor
  • b. Private Home Page
  • c. Personal Home Page
  • d. Personal Hypertext Processor

The correct answer is a: PHP: Hypertext Preprocessor


Question 5

PHP server scripts are surrounded by what delimiters?

Select one:

  • a. <&>
  • b. <?PHP ?>
  • c. <?PHP >
  • d. <__no__>><__no__>>

The correct answer is b: <?PHP ?>


Question 6

How do you write "Hello World" in PHP?

Select one:

  • a. Document.Write("Hello World");
  • b. echo “Hello World”;
  • c. “Hello World”
  • d. system.out.println(“Hello World”);

The correct answer is b: echo “Hello World”;


Question 7

All variables in PHP start with which symbol?

Select one:

  • a. &
  • b. $
  • c. !
  • d. --

The correct answer is: b: $


Question 8

What is the correct way to end a PHP statement?

Select one:

  • a.
  • b. :
  • c. .
  • d. ;

The correct answer is d: ;


Question 9

True or False:The PHP syntax is similar to many languages including C++ and Java, which makes it easy to learn for programmers:

Select one:

  • True
  • False

The correct answer is: True


Question 10

True or False: When using the POST method, variables are displayed in the URL.

Select one:

  • True
  • False

The correct answer is: False


Question 11

True or False: In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings.

Select one:

  • True
  • False

The correct answer is: True.


Question 12

The PHP syntax is most similar to:

Select one:

  • a. JavaScript
  • b. Perl and C
  • c. HTML
  • d. CSS

The correct answer is: b. Perl and C


Question 13

How do you get information from a form that is submitted using the "get" method?

Select one:

  • a. $_GET[];
  • b. Request.Form;
  • c. Request.QueryString;
  • d. .getParameter();

The correct answer is: a. $GET[];


Question 14

What is the correct way to create a function in PHP?

Select one:

  • a. new_function myFunction()
  • b. function myFunction()
  • c. create myFunction()
  • d. create myFunction(function)

The correct answer is: b. function myFunction()


Question 15

What is the correct way to add 1 to the $count variable?

Select one:

  • a. $count =+1
  • b. ++count
  • c. $count++;
  • d. count++;

The correct answer is: d. count++;

Related Posts

0 Comments

12345

    00