Q. What is right way to Initialization array? (Solved)

1. int num[6] = { 2, 4, 12, 5, 45, 5 } ;

2. int n{} = { 2, 4, 12, 5, 45, 5 } ;

3. int n{6} = { 2, 4, 12 } ;

4. int n(6) = { 2, 4, 12, 5, 45, 5 } ;

  • a. int num[6] = { 2, 4, 12, 5, 45, 5 } ;
Subscribe Now

Get All Updates & News