php programming language MCQ : Arrays- multidimensional arrays Link2

Php programming language MCQ : Arrays: Link2

Arrays MCQ

       Are you worried about the answers to PHP programming-Arrays-Identifying elements of an array, Storing data in arrays, Multidimensional arrays, Extracting multiple values, Converting between arrays and variables, Traversing arrays, Sorting questions? We have arranged the Show Answer button under the each question. Candidates can click on it to know the right option among the given alternatives. Furthermore, the applicants can check our web portal @ www.totalmcq.com to take part in more MCQ on various subject. Wish, the given information about the Arrays MCQ will helpful to the advance and can learn the various types of questions and answers.


Q.1. For finding nonempty elements in array we use--------

A. is_array ( ) function                                                              B. sizeof ( ) function
C. array_count ( ) function                                                       D. count ( ) function

Q.2. Pos ( ) function is an alias for---------

A. array_walk ( ) function                                                              B. each ( ) function
C. next ( ) function                                                       D. current ( ) function

Q.3. Indices of arrays can be either strings or numbers and they are denoted as-------.

A. $my_array {4}
B. $my_array [4]
C. $my_array| 4 |
D. None of the above

Q.4. To retrieve a value from an array we can use its -----.

A. Name
B. Location
C. Index
D. None of the above

Q.5. End ( ) function jumps pointer------.

A. To the last entry in the list
B. To the first entry in the list
C. To one step back
D. To one step forward

Q.6. To rewind pointer at beginning of list------ function is used.

A. rewind ( )
B. reset ( )
C. set ( )
D. None of the above

Q.7. Which function takes two arguments, an array to be traversed and name of a function to apply to each key/value pair?

A. array_walk ( ) function
B. each ( ) function
C. next ( ) function
D. end ( ) function

Q.8. Internal linked keys in an array can be retrievable by-----.

A. pointer ( ) function B. each ( ) function
C. key ( ) function
D. None of the above

Q.9. Current ( ) function is a -------array argument.

A. 2
B. 3
C. 1
D. None of the above

Q.10. Creating a new array from specification of its elements and associated keys, is known as----------.

 <?php \\
     \$fruits = array("apple", "orange", array ("pear", "mango"),
    "banana"); \\
    echo (count(\$fruits, 1));\\ 
?>

A. Direct assignment                                                                                B. Array ( ) construct
C. Specifying indices                                                                             D. All of the above