Quiz-4: Function & Array

Quiz-4: Function & Array

University

15 Qs

quiz-placeholder

Similar activities

Array_php

Array_php

University

20 Qs

PHP 2

PHP 2

University

10 Qs

Pemrograman Web 03

Pemrograman Web 03

University

13 Qs

Coding Challenge Round 1

Coding Challenge Round 1

University

10 Qs

PHP Beginners Quiz

PHP Beginners Quiz

University

15 Qs

Fundamental PHP

Fundamental PHP

University

20 Qs

Quiz 1 PHP

Quiz 1 PHP

University

20 Qs

HTML PHP C++

HTML PHP C++

University

10 Qs

 Quiz-4: Function & Array

Quiz-4: Function & Array

Assessment

Quiz

Other

University

Medium

Created by

Vikash Sawan

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct way to declare an array in PHP?

array()

array[]

array{}

array<>

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code? $fruits = array('apple', 'banana', 'orange'); echo $fruits[1];

orange

banana

apple

grape

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code? $numbers = array(1, 2, 3, 4, 5); echo count($numbers);

3

2

5

1

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which function is used to remove the last element from an array in PHP?

array_push()

array_shift()

array_slice()

array_pop()

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which function is used to sort an array in ascending order in PHP?

sort

ksort

asort

rsort

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How to define a function in PHP?

function {function body}

data type functionName(parameters) {function body}

functionName(parameters) {function body}

function functionName(parameters) {function body}

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Total looping techniques supported by PHP are?

1

2

3

4

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?