Single Dimensional Array
Single Dimensional Array Name: - Sanjyot Sanjay Mankar Urn no: - 2020-B-03022003 Class: - BCA CTMA Course Name : - C Programming · what's an array? Ø An array may be a collection of 1 or more values of an equivalent type. Each value is named a component of the array. the weather of the array shares an equivalent variable name but each element has its own unique index (also referred to as a subscript). An array is often of any type, for instance, int, float, char, etc. an array is must be of type int only. Ø To store roll no. of 100 students, we've to declare an array of size 100 i.e, roll_no[100]. Here size of the array is 100, so it's capable of storing 100 values. "In C, index or subscript starts from 0, so roll_no[0] is that the primary element, roll_no[1] is that the second element, and so on.". Note that the last element of the array is going to be at roll_no[99] not at roll_no[100] because the index starts at 0. Ø Arrays are often single