Загрузка...

C Programming - 47 - Initialize an array

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 : https://www.facebook.com/codeglympse Subscribe My YouTube channel : http://www.youtube.com/ticoontechnologies

Видео C Programming - 47 - Initialize an array автора Java Innovators: инновации в программировании
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки