ARRAYS OF STRUCTURES:
We use structures to describe the format of a number of related
variables. For example, in analyzing the marks obtained by a class of students,
we may use a template to describe student name, marks obtained in various
subjects and then declare all the students as structure variables. In such
cases, we may declare an array of structures, each element of the array
representing a structure variable.
struct class
student[100];
Defines an array called student that
consists of 100 elements. Each element is defined to be of the type struct
class.
No comments:
Post a Comment