what is Array and types of arraryAn array is a data structure that contains a series of elements . The array is used to store the collection of data. but it is mostly more useful to think about an array as a collection of variables of the same type .The elements are all of the related data type in .The Array is a collection of data items in the sequential form all the same types, accessed using a related name in the array .one dimensional array is like the single link list and the two dimensional array is like a table mean in two dimensional array rows and columns are shown.in array the data is stored in the different indexes but in sequence or series.There are different types of array.how to declare an array or method of declaring an array.The array is always start with the index (o). Arrays in declarationin C Programming LanguageThe array declaration is as follow
Initialization of Arrays in C Programming LanguageArray in C programming language can initialize in the compile time or in the run time.
Accessing the elements of Arrays in C ProgrammingThe elements of array access with the help of index number of the element. Noteable point is that the 1st element is present at the 0th index, 2nd element is present at the 1st index, and so on.
How to find the size of an arrayTo check the size of the array in the bytes (one byte is contain on 8 bits) , you can use the sizeof operator. int a[17]; The sizeof() operator will only work for the fixed size of an array.The sizeof() is based on the compilation time information.The sizeof operator is used to to give the size of the variable which is declared in the array.
Next TopicData Types In C-Programming
|