Web Application Development 1
(MidQuiz-1,Quiz-2&MidTerm Exam)
Question 1
Question text
Question 2
Question text
Question 3
Question text
This are used with numeric values to perform common arithmetical operations, such as addition, subtraction, multiplication etc
Question 4
Question text
are used to combine conditional statements
Question 5
Question text
Question 6
Question text
Identification. Write your answer on the space provided.
Which operator will check if two variables are the same?
Question 7
Question text
Question 8
Question text
Question 9
Question text
Question 10
Question text
Question 1
Question text
If I wanted to concatenate a word to a string variable I would use which of these?
Question 2
Question text
+, -, *, /, %, are all examples of what category of operators
Question 3
Question text
Question 4
Question text
Question 5
Question text
Question 6
Question text
Identification. Write your answer on the space provided.
Symbol use as identical
Question 7
Question text
&&, ||, ! are examples of what operator
Question 8
Question text
The concatenation operator in PHP?
Question 9
Question text
Question 10
Question text
The following example $x -= $y; is the same as?
Question 1
Question 2
Question 3
Question 4
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";
}
?>
Question 5
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>";
}
Question 6
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";
?>
Feedback
Your answer is correct.
Question 7
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";
?>
Question 8
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;
}
? >
Question 9
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";
?>
Feedback
Your answer is correct.
Question 1
Question 2
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;
}
?>
Question 3
Question 4
Question 5
Question 6
Question 7
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>";
}
?>
Question 8
Question 9
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;
}
?>
Question 10
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;
}
?>
Question 1
Question text
Question 2
Question text
Question 3
Question 4
Question text
The following example $a -= $b; is the same as?
Feedback
Your answer is correct.
Question 5
Question text
Question 6
Question 7
Question 8
Question 9
Question 10
Question text
Question 11
Question 12
Question text
Which statement will evaluate and include a file into the location where it is called.
Question 13
Question text
Question 14
Question text
Question 15
Question 16
Question text
Question 17
Question text
Question 18
Question 19
Question 20
Question text
Question 21
Question 22
Question 23
Question text
$a=1;
++$a;
$a*=$a;
echo $a- -;
Question 24
Question text
Question 25
Question 26
Question text
Question 27
Question 28
Question text
Question 29
Question text
Question 30
Question 31
Question text
Question 32
Question text
Question 33
Question 34
Question 35
Question text
Question 36
Question text
Question 37
Question text
Which one of the following is the right way of defining a function in PHP?
Question 38
Question text
Question 39
Question 40
Question 41
Question text
Question 42
Question text
Question 43
Question 44
Question text
Question 45
Question 46
Question 47
Question text
Question 48
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);
Feedback
Your answer is correct.