Computer Science, asked by tanayc, 5 months ago

URGENT
Which of the following array declarations are invalid? State reasons for invalidity.

i) char name[]=new char[20];

ii) int m[]=new int[1-40];

iii) float amount[] = new amount[40];

iv) int score[]=new int[5];

Answers

Answered by Oreki
1

Answer:

II and III.

Explanation:

II. Because the size of an array can't be negative.

III. Because amount is not a valid data type.

Similar questions