// 24T2 COMP1511 Week 5 Lecture 2 // Tammy Zhong #include #include #define MAX_LEN 2048 struct student { char name[MAX_LEN]; int id; double mark; }; int main(void) { struct student stu; strcpy(stu.name, "Jennie"); // ?? stu.id = 5555; stu.mark = 75.5; // TODO: change it to a pointer struct student *ptr = &stu; printf("The student name is %s, has a student ID of %d and a mark of %lf\n", ptr->name, ptr->id, ptr->mark); // ptr->name ---- (*ptr).name return 0; }