Quiz-4: Function & Array

Quiz
•
Other
•
University
•
Medium
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
Similar Resources on Wayground
10 questions
Computer Programming (Theory)

Quiz
•
University
20 questions
Quanta

Quiz
•
University
10 questions
HTML PHP C++

Quiz
•
University
20 questions
PHP cơ bản

Quiz
•
University
10 questions
Array

Quiz
•
University
20 questions
Season 5 #Spaic Python Weekly Quiz

Quiz
•
KG - Professional Dev...
16 questions
ACP 6 - PARTNERSHIP FORMATION

Quiz
•
University
10 questions
POST TEST MODULE 4

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade