#include #include #include //This program will create the file that is used in LAB 7 int main() { int ID, i, j; char name[20]; float balance; char c; struct Record { int i; char c; char a[20]; float b; } P1; FILE *fp; fp=fopen("Testcase.bin", "r"); while ((fread(&P1, sizeof(P1), 1, fp) ) == 1) { if(P1.c != 'E') {for (i=0;i<20;i++) P1.a[i]=P1.a[i]^0xFF;} printf("%d\n",P1.i); printf("%c\n",P1.c); printf("%s\n",P1.a); printf("%f\n",P1.b); } fclose(fp); }