Computer Science, asked by ertaarapi, 11 months ago

Which of the following statements is valid? 2 points int i(30); int i[4] = {3, 4, 3, 2}; int i[] = {3, 4, 3, 2}; double d[30]; int[] i = {3, 4, 3, 2};

Answers

Answered by Anonymous
0

Answer:

Array means collection. In Java also, an array is a collection of similar things. eg.- an array of int will contain only integers, an array of double will contain only doubles, etc.

Suppose you want to store the marks of 100 students. Obviously, you need a better approach over defining 100 different variables and using them. Here the role of array comes in.

Similar questions