+ 5
Correct initialization of Array
Tell the correct initialization statements for array: options: a) int A[3] = {1,2,3}; b) int A[3] = {123}; c) int A[3] = "123"; 4) All
2 Answers
+ 1
Challenge question?
Most probably (a) is the right answer, the numbers match the array definition, (b) seems fine, but the second and third element is left undefined, (c) is definitely wrong, array A is of type int, assigning string into it will trigger error, (d) you figure it out :)
Hth, cmiiw
+ 2
A is the correct answer. B lacks commas, C lacks curlies. Most definately not 4.