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

A int array=(1,2,3,4,5)

B int array={1,2,3,4,5}

C int array()=(1,2,3,4,5)

D int array[5]={1,2,3,4,5}

Solution

Correct Answer: Option D

Practice More Questions on Our App!

Download our app for free and access thousands of MCQ questions with detailed solutions