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
20 questions
ÔN TẬP 1 - Digital Marketing Analytics

Quiz
•
University
10 questions
DLSU Trivia Quiz

Quiz
•
University
12 questions
WEB UNIT10

Quiz
•
University
17 questions
EBUS2-3

Quiz
•
University
20 questions
Week 1 QUIZ

Quiz
•
University
20 questions
Pseudocode Mastery Challenge

Quiz
•
University
10 questions
HTML PHP C++

Quiz
•
University
10 questions
Computer Programming (Theory)

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University