
76 Data Structures Using C
Similarly, from built-in data structures, an array called studList can be selected to represent a
list. However, in this case each location has to be of type student which itself is a structure. The required
declaration is given below:
struct student studList [60];
It may be noted that the above given array of structures is a user-defined data structure constructed
from two built-in data structures: struct and array. Now in this case, exchange between data of ith and
jth student would require the following operations:
int i,j;
struct student temp;
temp = studList[i];
studList [i] = studList [j];
studList [j] = ...