Professional Documents
Culture Documents
In the above example declaration, size of the array 'marks' is 6 and the size of the
array 'studentName' is 16. This is because in case of character array, compiler
stores one extra character called \0 (NULL) at the end.
Accessing elements of
SINGLE DIMENSIONAL ARRAY
for (i=0;i<5;i++)
{
// Accessing each variable
printf("value of arr[%d] is %d \n", i, arr[i]);
}
}
THANK YOU