Which one of the following is the correct definition of the “is_array()”…

2023

Which one of the following is the correct definition of the “is_array()” function in C++?

  1. A.

    It checks that the specified variable is of the array or not

  2. B.

    It checks that the specified array is of single dimension or not

  3. C.

    It checks that the array specified is of multi-dimension or not

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 205 students.

Show answer & explanation

Correct answer: A

The is_array() function in C++ is a type trait that checks whether a given type is an array type. It returns true if the type is an array, and false otherwise. This function does not check the dimensionality (single or multi-dimensional) of the array. It only determines if the type is an array or not.

C++ में is_array() फ़ंक्शन एक टाइप ट्रेट है जो यह जाँचता है कि क्या दिया गया टाइप एक एरे टाइप है। यह तभी true लौटाता है जब टाइप एक एरे होता है, अन्यथा false। यह फ़ंक्शन एरे की आयामी (एकल या बहु-आयामी) की जाँच नहीं करता है। यह केवल यह निर्धारित करता है कि टाइप एक एरे है या नहीं।

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs