#include struct student { char name[32]; int year; int marks[10]; }; typedef student* Pstudent; void InitStudent(Pstudent s, const char *name, int year) { strcpy_s(s->name, 31, name); s->year = year; for (int i = 0; i < 10; i++) s->marks[i] = 0; } Pstudent CreateStudent(const char* name, int year = 2020) { Pstudent p = (Pstudent) malloc(sizeof(student)); InitStudent(p, name, year); return p; } void PrintStudent(const Pstudent p) { printf("%s (%d)\n", p->name, p->year); for (int i = 0; i < 10; i++) printf("%d", p->marks[i]); printf("\n"); } int main() { student s1, s2; Pstudent p1, p2; InitStudent(&s1, "Petrov", 2001); PrintStudent(&s1); s2 = s1; s2.year = 2005; PrintStudent(&s2); printf("%d\n", sizeof(s1)); p1 = CreateStudent("Sidorov"); p2 = CreateStudent("Ivanov", 2019); PrintStudent(p1); PrintStudent(p2); }