Tuesday, July 14, 2009

Writing an array and visiting each element of the array in C programming?

Well i don't understand how arrays really work, and I dont understand how to grab the element of the array, can someone


explain and show how to do this

Writing an array and visiting each element of the array in C programming?
Array id a data structure, it is a memory like in which u can store the datas of same type[ like all integers or all characters]


in adjacent locations..


Suppose u want to store marks of 5 subjects, u have to declare an array name 'sub' and of size 5, and its positions are 0, 1, 2, 3 ,4. now if u want to access the ur 3rd subject marks , u have to call it by the array name %26amp; its position as sub[2].


For more details, try google search...


All the best.......


No comments:

Post a Comment