You are not logged in.

#1 2015-09-16 04:52:53

hasnain
Administrator
From: Chichawatni
Registered: 2014-10-13
Posts: 8,355
Website

Initialize Array:

C Programming Quizzes C Language Arrays And Strings

Question:
What is right way to Initialize array?

Option A):
int n{} = { 2, 4, 12, 5, 45, 5 };
Option B):
int n(6) = { 2, 4, 12, 5, 45, 5 };
Option C):
int n{6} = { 2, 4, 12 };
Option D):
int num[6] = { 2, 4, 12, 5, 45, 5 };

Correct Answer is Option D):
int num[6] = { 2, 4, 12, 5, 45, 5 };


Failure is the first step towards seccess.

2015-09-16 04:52:53

Advertisement
Ads By Google

Re: Initialize Array:



\n

Board footer