Advertisement Remove all ads

How to Create Array of Structure Variable and Assign Values to Its Members? - Structured Programming Approach

Advertisement Remove all ads
Advertisement Remove all ads
Short Note

How to create array of structure variable and assign values to its members?

Advertisement Remove all ads

Solution

1. An array of structure can be declared in the same way as declaring array of any other data type.
2. For example, an array of the structure student can be declared as shown:
struct student s[100];
This array can now store information of 100 students.
3. Array of structure must be used when many variables of a structure are required.
4. Syntax:
Struct structure_name
{
data_type member1;
data_type member2;
-
-
data_type member;
};

Concept: Array
  Is there an error in this question or solution?
Advertisement Remove all ads

APPEARS IN

Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×