5,363 views
0 votes
0 votes
Under which of the following conditions, the size of an one-dimensional array need to be specified ?

a) when initialization is a part of definition

b) when it is a declaration

c) when it is a formal parameter or actual parameter

d) none of the above

2 Answers

Best answer
3 votes
3 votes

Option (d) None of the above is correct.

Because,

When Initialization is a part of declaration then we do not need the size.

In the declaration also we do not need to give the size of array. eg. extern int abc[]; is saying that refer to an global array abc defined in some file. 

Similarly when we use that as formal and actual parameter, we do not have to give the size. It will passed as a separate variable. 

selected by
1 votes
1 votes

b) when it is a declaration

reshown by

Related questions

3 votes
3 votes
1 answer
1
KISHALAY DAS asked Dec 11, 2016
1,393 views
1 votes
1 votes
2 answers
2
1 votes
1 votes
1 answer
3
Mrityudoot asked Feb 2
290 views
In what cases does an uninitialized array have values = 0 and for which cases does it have values = garbage values. How to differentiate?
1 votes
1 votes
1 answer
4
Mrityudoot asked Feb 2
176 views
Does C support fractional Indices?float x = some fraction;Is float a[x] valid declaration?