Question: What will be the output of the following PHP code ? 1. A. Hello World B. Bye C. Hello worldBye D. Error 2. A. 3

What will be the output of the following PHP code ?

1.

$bye = "Bye";

print $hello;"$bye";

?>

A. Hello World

B. Bye C. Hello worldBye D. Error

2.

var $two = 2;

print "$one / $two * $one / $two * $two";

A. 1 B. 0 C. 0.5 D. Error

3.

$num1 = 2;

print $num . "+". $num1 ;

?>

A. 3 B. 1+2 C. 1.+.2 D. Error

4.

$num1 = "2";

print $num+$num1 ;

?>

A. 3 B. 1+2 C. Error D. 12

5.

Which of the following php statement/statements will store 111 in variable num?

i) int $num = 111;

ii) int mum = 111;

iii) $num = 111;

iv) 111 = $num;

A. Both (i) and (ii) B. All of the mentioned. C. Only (iii) D. Only (i)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!