How to Create Array of a Structure in C++

Опубликовано: 05 Август 2026
на канале: COMFE
130
18

We can also make an array of structures. Suppose we need to store the data of 300 students. Declaring 300 separate variables of the structure is definitely not a good option. For that, we need to create an array of structures.
struct student
{
int ID;
string name;
int ob;
};

int main(){
student s[5];
}

SUBSCRIBE OUR CHANNEL:
   / comfe  
LIKE OUR FB PAGE:
  / comfecure  
FOLLOW ON INSTAGRAM:
  / comfecure  

#HowToCreateArrayOfStructure
#Array
#Structure
#COMFE
#array of structure