I believe we are confused in Initialization and declaration.
int i ; // declaration
int i = 10 ; declaration + initialization
i= 15 ; // assignment
You cannot only do initialization without declaration.
As per the initial question is concerned it is stupid to initialize the array with different values.
int alpha [50] = {1,2*2,3*3,…………………} ;// wrong syntax
int alpha[50] = {0} ; //initialize all the fifty elements by 0
Naure’s solution presumes taht the instructor wants to *assign* values to the array not exactly initialize. I agree with the solution.
Last edited by dubeyprateek; Dec 28th, 2007 at 7:22 pm.
I know I am. Therefore I am.