/* some file I/O (Input/Output) */ #include int main() { FILE *fptr; float a, b; int c, d; /* open the input file */ fptr = fopen("04_input_data.txt", "r"); /* read the data */ fscanf(fptr, "%f %f %d %d", &a, &b, &c, &d); /* print out the data */ printf("Data read from file: a = %f b = %f c = %d d = %d\n", a, b, c, d); /* remember to close the file */ fclose(fptr); }