Arrays Questions And Answers
Here you can find Arrays Questions and Answers.
Why Arrays Questions and Answers Required?
In this Arrays Questions and Answers section you can learn and practice Arrays Questions and Answers to improve your skills in order to face technical inerview conducted by organisations. By Practicing
these interview questions, you can easily crack any Exams interview.
Where can I get Arrays Questions and Answers?
AllIndiaExams provides you lots Arrays Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download Arrays Questions and
Answers as PDF files and eBooks.
How to solve these Arrays Questions and Answers?
You no need to worry, we have given lots of Arrays Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Competitive Exams interview.
Arrays Questions & Answers
1. PHP’s numerically indexed array begin with position __.
Arrays Questions & Answers
2. Which of the functions is used to sort an array in descending order?
Arrays Questions & Answers
3. Which of the following are correct ways of creating an array?
(i) state[0] = “karnatakaâ€;
(ii) $state[] = array(“karnatakaâ€);
(iii) $state[0] = “karnatakaâ€;
(iv) $state = array(“karnatakaâ€);
Arrays Questions & Answers
4. What will be the output of the following PHP code?
< ?php
$fruits = array ("mango", "apple", "pear", "peach");
$fruits = array_flip($fruits);
echo ($fruits[0]);
?>
Arrays Questions & Answers
What will be the output of the following php code?
< ?php
$states = array("karnataka" => array
( "population" => "11,35,000", "captial" => "Bangalore"),
"Tamil Nadu" => array( "population" => "17,90,000",
"captial" => "Chennai") );
echo $states["karnataka"]["population"];
?>
Arrays Questions & Answers
6. Which function will return true if a variable is an array or false if it is not?
Arrays Questions & Answers
7. Which in-built function will add a value to the end of an array?
Arrays Questions & Answers
8. What will be the output of the following PHP code?
< ?php
$state = array ("Karnataka", "Goa", "Tamil Nadu",
"Andhra Pradesh");
echo (array_search ("Tamil Nadu", $state) );
?>
Arrays Questions & Answers
9. What will be the output of the following PHP code?
< ?php
$fruits = array ("apple", "orange", "banana");
echo (next($fruits));
echo (next($fruits));
?>
Arrays Questions & Answers
10. Which function can be used to move the pointer to the previous array position?