ICSE Class 10 Computer Applications
Question 20 of 30
Solved Sample Paper 3 — Question 20
Back to all questions 20
Question Question 1(xx)
Correct statement to declare an integer array of 10 elements.
- int[ ] arr = new int[10];
- int arr;
- int arr (10);
- int ( ) arr = new int (10);
int[ ] arr = new int[10];
Reason — The correct syntax to declare an array is as follows:
datatype[ ] array_name = new datatype[size];
The statement int[ ] arr = new int[10]; follows the correct syntax of array declaration.