## Web Application Development 1(MidQuiz-1,Quiz-2&MidTerm Exam)

### Question 1

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

If the variable \$x = 11; , what will \$x equal if it is incremented, that is, if I write \$x++; what value will \$x contain after it has been incremented?
Select one:

### Question 2

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

True or False - Using the operator AND to combine concept terms is a good way to increase the number of records retrieved in a search.
Select one:

### Question 3

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

This are used with numeric values to perform common arithmetical operations, such as addition, subtraction, multiplication etc

### Question 4

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

are used to combine conditional statements

### Question 5

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

True or False - The operator OR, when used to link two or concept terms will retrieve fewer records because both terms need not be present in each article.
Select one:

### Question 6

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Which operator will check if two variables are the same?

### Question 7

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

True or False - The operator AND, when used to link two concept terms (e.g. children and violence) will retrieve only those records that contain both concept terms.
Select one:

### Question 8

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The logical operator && stands for?
Select one:

### Question 9

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following condition will return TRUE or FALSE7 >= 7 && 9 < 2)
Select one:

### Question 10

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following comparison condition would return TRUE or FALSE3 <> 6)
Select one:

### Question 1

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

If I wanted to concatenate a word to a string variable I would use which of these?

### Question 2

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

+, -, *, /, %, are all examples of what category of operators

### Question 3

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The logical operator || stands for?
Select one:

### Question 4

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

True or False - The following search statement will exclude any records that contain the term "poodle." (dogs OR canines) NOT cats.
Select one:

### Question 5

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following condition will return TRUE or FALSE ( (2 >= 2 && 8 < 1) || (11 == 33 || 5 > 3) )
Select one:

### Question 6

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Symbol use as identical

### Question 7

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

&&, ||, ! are examples of what operator

### Question 8

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The concatenation operator in PHP?

### Question 9

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following condition will return TRUE or FALSE: !(3 >= 3 || 8 < 1)
Select one:

### Question 10

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following example \$x -= \$y; is the same as?

Select one:
Question 2 Correct Mark 1.00 out of 1.00 Not flaggedFlag question Question text Identification. Write your answer on the space provided. The basic assignment operator in PHP is Answer =

### Question 1

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 2

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 3

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 4

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

<?php

for(\$x=1;\$x<10;++\$x)

{

print"*\t";

}

?>

Select one:

### Question 5

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

<?php

\$colors=array("red","green","blue","yellow");

foreach(\$colorsas\$value)

{

echo"\$value<br>";

}

Select one:

### Question 6

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

<?php

for(\$i==2;++\$i==\$i;++\$i)

print"In for loop ";

print"After loop\n";

?>

Select one:

### Question 7

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

<?php

for(1;\$i==1;\$i=2)

print"In for loop ";

print"After loop\n";

?>

Select one:

### Question 8

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

< ?php

\$i = 0;

for (\$i)

{

print\$i;

}

? >

Select one:

### Question 9

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

<?php

for(\$i++;\$i==1;\$i=2)

print"In for loop ";

print"After loop\n";

?>

Select one:

### Question 10

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 1

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 2

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

<?php

\$x;

for(\$x=-3;\$x<-5;++\$x)

{

print++\$x;

}

?>

Select one:

### Question 3

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 4

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 5

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 6

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 7

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

<?php

for(\$x=0;\$x<=10;\$x++)

{

echo"The number is: \$x<br>";

}

?>

Select one:

### Question 8

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code ?

Select one:

### Question 9

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer. What will be the output of the following PHP code ?

<?php

for(\$x=0;\$x<=10;print++\$x)

{

print++\$x;

}

?>

Select one:

### Question 10

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

Multiple choice. Select the best answer.

What will be the output of the following PHP code ?

<?php

for(\$x=-1;\$x<10;--\$x)

{

print\$x;

}

?>

Select one:

### Question 1

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

The following condition will return TRUE or FALSE4 >= 4 || 8 < 1)
Select one:

### Question 2

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

If the variable \$x = 10; , what will \$x equal if it is incremented, that is, if I write \$x++; what value will \$x contain after it has been incremented?
Select one:

### Question 3

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be displayed in a browser when the following PHP code is executed:

Select one:

### Question 4

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following example \$a -= \$b; is the same as?

Select one:

### Question 5

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

PHP's numerically indexed array begin with position __.
Select one:

### Question 6

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be displayed in a browser when the following PHP code is executed:

Select one:

### Question 7

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code?

Select one:

### Question 8

Incorrect
Mark 0.00 out of 1.00
Remove flag

#### Question text

What will be the output of the following PHP code?   GOOD LUCK!

Select one:

### Question 9

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be displayed in a browser when the following PHP code is executed:

Select one:

### Question 10

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The logical operator && stands for?
Select one:

### Question 11

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will happen in this function call?

Select one:

### Question 12

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Which statement will evaluate and include a file into the location where it is called.

Select one:

### Question 13

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

There are three different kind of arrays:
Select one:

### Question 14

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

In which positions PHP's indexed array begin?
Select one:

### Question 15

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code?

Select one:

### Question 16

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The logical operator ! stands for?
Select one:

### Question 17

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following are examples of =, !=, === ______ Operators
Select one:

### Question 18

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What is the output of the following code?

Select one:

### Question 19

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be displayed in a browser when the following PHP code is executed:

Select one:

### Question 20

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The PHP If Else Statement can execute the code within the if and else segments at the same time?
Select one:

### Question 21

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code?

Select one:

### Question 22

Correct
Mark 1.00 out of 1.00
Remove flag

#### Question text

What is the output of the following code?

Select one:

### Question 23

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What is the output of the following code?
\$a=1;
++\$a;
\$a*=\$a;
echo \$a- -;
Select one:

### Question 24

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following condition will return TRUE or FALSE: (4 >= 4 && 8 < 1)
Select one:

### Question 25

Correct
Mark 1.00 out of 1.00
Remove flag

#### Question text

What is the output of the following code?

Select one:

### Question 26

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The PHP If Statement will only execute the code within it's curly braces if the if condition is FALSE?
Select one:

### Question 27

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code?

Select one:

### Question 28

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What is the output of the following? echo substr("abcdef", -2), ', '; echo substr("abcdef", 4), ', '; echo substr("abcdef", -3, -1), ', '; echo substr("abcdef", 4, -2), ', '; echo substr("abcdef", 2, -1)
Select one:

### Question 29

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What is the function of the ucfirst and lcfirst functions?
Select one:

### Question 30

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will the following script output?

Select one:

### Question 31

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The logical operator || stands for?
Select one:

### Question 32

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following condition will return TRUE or FALSE:!(4 >= 4 || 8 < 1)
Select one:

### Question 33

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be displayed in a browser when the following PHP code is executed.

Select one:

### Question 34

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code?

Select one:

### Question 35

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use?
Select one:

### Question 36

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What is the output of the following? echo strcmp('first', 'second'), ", "; echo strcmp('44', '054'), ", "; echo strcmp('0x80', 'a'), ", "; echo strcmp('a', 'A');

Select one:

### Question 37

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Which one of the following is the right way of defining a function in PHP?

Select one:

### Question 38

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What functions count elements in an array?
Select one:

### Question 39

Incorrect
Mark 0.00 out of 1.00
Flag question

#### Question text

What will be displayed in a browser when the following PHP code is executed

Select one:

### Question 40

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code?

Select one:

### Question 41

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following comparison condition would return TRUE or FALSE4 <> 7)
Select one:

### Question 42

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following are examples of >, <, <=, >=, ==________ Operators
Select one:

### Question 43

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What is the output of the following code?

Select one:

### Question 44

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Which is identified as a special variable, which can store multiple values in one single variable?
Select one:

### Question 45

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What will be the output of the following PHP code?

Select one:

### Question 46

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What is the output of the following code?

Select one:

### Question 47

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following condition will return TRUE or FALSE ( (4 >= 4 && 8 < 1) || (44 == 33 || 5 > 3) )
Select one:

### Question 48

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

What is the output of the following code snippet? \$str = 'asdfghyo off on off'; \$replace_pairs = array('a' => 'q', 's' => 'w', 'd' => 'e', 'f' => 'r', 'y' => 'z', 'o' => 'i', 'off' => 'on', 'on' => 'off'); echo strtr(\$str, \$replace_pairs);

Select one:

### Question 49

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

The following are examples of =, +=, *=, /=, .= _______ Operators
Select one:

### Question 50

Correct
Mark 1.00 out of 1.00
Flag question

#### Question text

Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays). Of course, these key methods can be combined as well.
Select one: