Ask Question
9 April, 15:43

Which of the following is a valid C+ + array definition?

A.

int array[0];

B.

float $payments[10];

C.

void numbers[5];

D.

int array[10];

+1
Answers (1)
  1. 9 April, 17:08
    0
    The correct answer for the given question is option (D) i. e int array[10];

    Explanation:

    As array is the collection of similar types of elements

    we can declared array

    Datatype arrayname[size];

    In option (A) the size of array is 0 which is wrong thats why this option is wrong.

    In option (B) the arrayname cannot start with ' $' thats why this option is wrong.

    In option (c) we cannot give void datatype as a arrayname thats why this option is wrong.

    So the correct option is (D) i. e int array[10];
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following is a valid C+ + array definition? A. int array[0]; B. float $payments[10]; C. void numbers[5]; D. int array[10]; ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers