Correct way of declaring an array - int array[10]

Q.  Which of the following is the correct way of declaring an array?
- Published on 16 Jun 15

a. array(5)
b. int array[10]
c. int array{5}
d. array{10}

ANSWER: int array[10]
 
This is the correct way as the values have to be declared only after the datatype.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)