C Programming MCQ

1:

Size of the array need not be specified, when

A.

Initialization is a part of definition

B.

It is a declaratrion

C.

It is a formal parameter

D.

All of these

 

Answer : A

Explanation :

Consider the following declaration
double balance[] = {1000.0, 2.0, 3.4, 17.0, 50.0};
If you omit the size of the array, an array  just big enough to hold the initialization is created. So, correct option is 'A'.

Naveen Kumar Chaudhary said: (8:54pm on Thursday 4th July 2013)
The answer is wrong as size must be specified during declaration.The answer must be [c].If you have any clarification ,please mail me.
Narendra Kumar Rout said: (11:11pm on Tuesday 31st December 2013)
I think option A and C is correct
Shaima Rahim said: (1:20am on Monday 18th December 2017)
Option D is correct.In all 3 cases mentioned,the size of array need not be specified.

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.