What is the use of empty() function in array classes?

a) To check whether the size of an array is zero or not
b) To check whether an array is empty or not
c) To check how many elements are there in the array
d) To check whether an array contains negative elements or not

1 thought on “What is the use of empty() function in array classes?”

  1. a
    Explanation: empty() function is used to check whether the size of an array class is zero or not. It is not used to check whether an array is empty or not. The function true only if size/max_size of an array is zero otherwise it returns false

Leave a Comment