Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 The array_shift() function adds one or more elements to the beginning

ID: 3587021 • Letter: Q

Question

QUESTION 1

The array_shift() function adds one or more elements to the beginning of an array.

True

False

QUESTION 2

You use the array_unshift() function to remove the first element of an array.

True

False

QUESTION 3

The array_pop() functions removes the element located at the end of the array.

True

False

QUESTION 4

The array_push() function adds an element to the end of an array.

True

False

QUESTION 5

The array_splice() function splices arrays together and renumbers the array indices.

True

False

QUESTION 6

The unglue() function removes array elements.

True

False

  

QUESTION 7

The unset() function does not renumber the remaining elements in the array.

True

False

QUESTION 8

The array_unique() function removes duplicate values in an array.

True

False

QUESTION 9

There is an internal array pointer that refers to the currently selected array element.

True

False

QUESTION 10

If a value exists in an array the in_array() function returns 'present', otherwise it returns 'absent'.

True

False

QUESTION 11

The array_key_exists() function determines if a given index or key exists.

True

False

QUESTION 12

The array_keys() function returns an indexed array of all the keys in an associative array.

True

False

QUESTION 13

The array_slice() function returns part of an array and assign it to another array.

True

False

QUESTION 14

You will usually sort arrays using sort() and rsort() for associative arrays.

True

False

QUESTION 15

To merge two or more arrays use the array_merge() function.

True

False

Explanation / Answer

Question 1: False

Reason: The array_shift() function removes the first element from an array, and returns the value of the removed element.

Question 2: False

Reason:The array_unshift() function inserts new elements to an array. The new array values will be inserted in the beginning of the array.

Question 3: True

Question 4: True

Question 5: False

Reason: The array_splice() function removes selected elements from an array and replaces it with new elements. The function also returns an array with the removed elements.

Question 6: False

Reason: No such function exists

Question 7: True

Question 8: True

Question 9: True

Question 10: False

Reason: It return TRUE if the element exists or FALSE (it is case sensitive)

Question 11: True

Question 12: True

Question 13: True

Question 14: False

Reason: asort() sorts an associative array in ascending order, according to the value.

krsort() sorts an associative array in descending order, according to the key.

sort() - sort arrays in ascending order

rsort() - sort arrays in descending order.

Question 15: True

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote