134k views
1 vote
Which two are valid array declarations? Choose all correct answers) □uint size; □ int size!; □int array size; int[] size;

User Fotini
by
5.2k points

1 Answer

5 votes

Answer: int[] size;

int size[];

Explanation: The declaration of the array is done with the appropriate type of datatype and associated with the length of the array in the "[]"brackets . The number input present in the "[]" defines about the length of the string that is being used in the particular program.

int[] size; and int size[]; are the correct declaration and other two options are incorrect because in []int size; length cannot be given before datatype declaration and 'int array size " does not have"[]" to mention the array length.

User Majid Ali Khan
by
4.7k points