Dynamic Web Page Development (3350702) MCQs

MCQs of Working with PHP Arrays and functions

Showing 21 to 30 out of 59 Questions
21.

What will be the output of the following PHP code?

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

(a)

-5

(b)

-4

(c)

4.9

(d)

4

Answer:

Option (b)

22.

Unix time is the number of seconds that have passed since _______.

(Unix time એ _______ થી પસાર થતી સેકંડની સંખ્યા છે.)

(a)

January 1, 1960

(b)

January 1, 1970

(c)

January 1, 1980

(d)

December 1, 1970

Answer:

Option (b)

23.

What will be the output of the following PHP code? (If say date is 12/08/2019.)

(નીચેના PHP કોડનું આઉટપુટ શું હશે?) (જો તારીખ 12/08/2019 હોય તો)

(a)

Today is 12 Aug, 2019

(b)

Today is 12-08-2019

(c)

Today is 12-august-2019

(d)

Today is August 12, 2019

Answer:

Option (a)

24.

What is the correct way to open the file "time.txt" as readable?

("time.txt" ફાઇલને વાંચવા યોગ્ય તરીકે ઓપન કરવાની સાચી રીત કઈ છે?)

(a)

fopen("time.txt","r");  

(b)

fopen("time.txt","r+");

(c)

open("time.txt","read");

(d)

open("time.txt");

Answer:

Option (a)

25.

Which of the functions is used to sort associative arrays in descending order, according to the value?

(વેલ્યુ અનુસાર, ઉતરતા ક્રમમાં એસોસિએટીવ એરેને sort કરવા માટે કયા ફંકશનનો ઉપયોગ થાય છે?)

(a)

arsort()

(b)

asort()

(c)

rsort()

(d)

dsort()

Answer:

Option (a)

26.

An array is a _______ that can hold more than one value at once.

(એરે એ _______ છે જે એક જ સમયે એક કરતા વધુ વેલ્યુ ધરાવે છે.)

(a)

single object

(b)

single variable

(c)

single class

(d)

multiple variable

Answer:

Option (b)

27.

How many types of array are available in php?

(PHP માં કેટલા પ્રકારના એરે આવેલા છે?)

(a)

1

(b)

2

(c)

3

(d)

4

Answer:

Option (c)

28.

How do you create an array in PHP?

(તમે PHP માં એરે કેવી રીતે બનાવો છો?)

(a)

$cars = array["Volvo", "BMW", "Toyota"];

(b)

$cars = "Volvo", "BMW", "Toyota";

(c)

$cars = array("Volvo", "BMW", "Toyota");  

(d)

$cars = array{"Volvo" "BMW" "Toyota"};  

Answer:

Option (c)

29.

What will be the output of the following PHP code?

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

(a)

My car is a Volvo

(b)

My car is a BMW

(c)

My car is a Toyota

(d)

Error

Answer:

Option (a)

30.

What will be the output of the following PHP code?

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

(a)

TRUE

(b)

1

(c)

FALSE

(d)

2

Answer:

Option (d)

Showing 21 to 30 out of 59 Questions