Dynamic Web Page Development (3350702) MCQs

MCQs of Working with Basic Building Blocks of PHP

Showing 1 to 10 out of 48 Questions
1.

PHP is an example of ___________ scripting language.

(PHP એ ___________ સ્ક્રિપ્ટીંગ ભાષાનું ઉદાહરણ છે.)

(a)

Server-side

(b)

Client-side

(c)

Browser-side

(d)

In-side

Answer:

Option (a)

2.

Is PHP case sensitive?

(શું PHP એ case sensitive છે?)

(a)

FALSE

(b)

TRUE

Answer:

Option (b)

3.

PHP server scripts are surrounded by delimiters, which?

(PHP સર્વર સ્ક્રિપ્ટો શેની અંદર આવેલી હોય છે?)

(a)

<&>...</&>

(b)

<?php...?> 

(c)

<?php>...</?>

(d)

<script>...</script>

Answer:

Option (b)

4.

How do you write "Hello World" in PHP?

(તમે PHP માં "Hello World" કેવી રીતે લખો છો?)

(a)

Document.Write("Hello World");

(b)

"Hello World";

(c)

echo "Hello World";  

(d)

echo("Hello", "World");

Answer:

Option (c)

5.

All variables in PHP start with which symbol?

(PHP માં બધા વેરીએબલ કયા સિમ્બોલથી શરૂ થાય છે?)

(a)

!

(b)

$  

(c)

&

(d)

"

Answer:

Option (b)

6.

How should we add a single line comment in our PHP code?

i) /?

ii) //

iii) #

iv) /* */

PHP કોડમાં આપણે સિંગલ લાઇન comments કેવી રીતે ઉમેરી શકીએ છીએ?

i) /?

ii) //

iii) #

iv) /* */

(a)

Only ii) 

(b)

 i), iii) and iv)

(c)

ii), iii) and iv)

(d)

Both ii) and iv)

Answer:

Option (c)

7.

Which of the following PHP statements will output Hello World on the screen?

i) echo ("Hello World");

ii) print ("Hello World");

iii) echo "Hello World";

iv) sprintf ("Hello World");

નીચેનામાંથી કયા PHP statements Hello Worldને આઉટપુટ તરીકે સ્ક્રીન પર આપશે?

i) echo ("Hello World");

ii) print ("Hello World");

iii) echo "Hello World";

iv) sprintf ("Hello World");

(a)

 i) and ii)

(b)

 i), ii) and iii)

(c)

i), ii), iii) and iv)

(d)

i), ii) and iv)

Answer:

Option (b)

8.

What will be the output of the following PHP code?

(નીચેના PHP કોડનું આઉટપુટ શું હશે?)

(a)

Hello World

(b)

Hello

(c)

World

(d)

HelloWorld

Answer:

Option (d)

9.

What will be the output of the following PHP code?

(નીચેના PHP કોડનું આઉટપુટ શું હશે?)

(a)

onetwo

(b)

 $one$two

(c)

one

(d)

error

Answer:

Option (a)

10.

What will be the output of the following PHP code?

(નીચેના PHP કોડનું આઉટપુટ શું હશે?)

(a)

0

(b)

1

(c)

Nothing

(d)

Error

Answer:

Option (c)

Showing 1 to 10 out of 48 Questions