Which of the following is correct to initialize arrays in C?

Which of the following is correct to initialize arrays in C?

  1. a) int array = (1, 2, 3, 4, 5)
  2. b) int array = {1, 2, 3, 4, 5}
  3. c) int array() = (1, 2, 3, 4, 5)
  4. d) int array[5] = {1, 2, 3, 4, 5}

From the Combined Bank Assistant Programmer (CSE) March 2021 – Preliminary exam, question 1 of 86.

More from this paper