Which of the following is the correct way to initialize an array?
Which of the following is the correct way to initialize an array?
- A.
int num[6] = (2, 4, 12, 5, 45, 5)
- B.
int num[ ] = {2, 4, 12, 5, 45, 5}
- C.
int num{6} = {2, 4, 12}
- D.
int num(6) = {2, 4, 12, 5, 45, 5}
Attempted by 947 students.
Sign up free to check your answer
Sign up freeLoading lesson…

