Dear programmers :)

Could you explain to me what is a structure in C? What is she for? and give a small example?

Thanks in advance!

    1 answer 1

    The structure in the C language is a “user-defined” type with a set of some fields. It allows you to store, in simple terms, a set of logically combined data, which is necessary in the course of solving many problems. An example of a student journal entry:

    struct student{ char stud_first_name[18]; char stud_second_name[18]; int stud_avg_max; }; 

    Then you can create variables of type "student", and work with its fields. It is better, of course, to read about it: "B. Kerrigan, D. Ritchie - C programming language"