I am trying to get this program that will read 5 integers from a file using fscanf, and I have to somehow embed that into a for-loop. I understand how fscanf works, but have no idea on how to embed it into a loop. testdata9 has the 5 integers.
I have no idea what to do after this.
Code:#include <stdio.h> int main( ){ int a, b, c, d, e; FILE *testdata9; testdata9 = fopen("testdata9.c", "r"); for(fscanf(testdata9, "%d %d %d %d %d", &a, &b, &c, &d, &e)){ } return 0; }



LinkBack URL
About LinkBacks


