person.txtCode:#include <stdio.h> #include <stdlib.h> struct data { int id; char name[30]; int number; int grade; }; int main(void) { FILE *fp; struct data person; fp = fopen("person.txt", "r"); if (fp = NULL) exit(1); fread(&person, sizeof(data), 1, fp); fclose(fp); printf("%s\n", person.name); return 0; }
When I run this program, the send report window pops up and my program closes. What am I doing wrong? Thanks.Code:365523 Max Payne 28 82