You are not logged in.

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

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
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 };


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-09-16 04:52:51

Advertisement
Ads By Google

Re: Initialize Array:



Board footer