Ask Question
23 July, 02:11

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];

+4
Answers (1)
  1. 23 July, 05:38
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers