Structure having Integer Array as Member

  1. Structure may contain the Array of integer as its Member.
  2. Let us discuss very familiar example of student , We can store name,roll,percent as structure members , but sometimes we need to store the marks of three subjects then we embed integer array of marks as structure member
Example :Structure
struct student
{
     char sname[20];
     int roll;
     float percent;
     int marks[3];     //Note Carefully
}s1;
Access marks of Student s1 :
Access Subject 1 Marks : s1.marks[0]
Access Subject 2 Marks : s1.marks[1]
Access Subject 3 Marks : s1.marks[2]

Bookmark & Share


Tags / Keywords : | ,

0 comments

Post a Comment

Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email