#include "student.h" #include #include struct Student { char name[50]; int age; }; struct Student* new_student(char* name, int age) { struct Student* t = (struct Student*) malloc(sizeof(struct Student)); if(t == NULL) return NULL; strncpy(t->name, name, 49); t->name[49] = '\0'; t->age = age; return t; } void change_name(struct Student* s, char* name){ strncpy(s->name, name, 49); s->name[49] = '\0'; }