Posts

Showing posts from October, 2020

Array And String

Array An Array is group similar data of one particular data types, the array's elements are continuous in nature when the array is declared the location of the array elements is continuous in memory. advantage of the array is we can assess the similar type of data by using only one variable and as the elements of an array are continuous in memory we can assess the element just by knowing the address of the first element we will see that in pointers. We access the elements of the array by the index in c programming the index of the array starts from 0 to N-1,  where  N is the length of the array. For example, if we want to access the first element of the array then we can use array[ 0 ],  and array[ 4 ] gives us the fifth element of the array. here the 0 and the 4 is the index for the first and the fifth element of the array. // image of arrays Declaration of array: Declaration of the array is the same as declaring a variable of any other data type, but in the case of an array we ne...