You can initialize an array at the time of its declaration. Following are valid array declarations in a C program.
int X[5] = { 5 , 7, 9, 4 , 2};
char vowels[5] = { 'a' , 'e' , 'i', 'o', 'u' };
int Y[ ] = { 7, 9, 2 };
Look at the last declaration, here the array dimension is not provide. This is also a valid array declaration. If you initialize an array at the time of its declaration , then the array dimension is optional. Put a comma operator between each members in array initialization. Always put a single quotes or double quotes while initializing a character array.
Visit my blog : http://www.easyway2in.blogspot.com
Like my Facebook page : / codeglympse
Subscribe My YouTube channel : / ticoontechnologies
Watch video C Programming - 47 - Initialize an array online without registration, duration hours minute second in high quality. This video was added by user PRABEESH R K 24 December 2014, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,000 once and liked it 19 people.