What does fscanf return when it reads data in the file. For example,
int number1, number2, number3, number4, c;
c = fscanf (spFile, "%d", &number1);
//c will be 1 in this case.
c = fscanf (spFile, "%d %d %d %d", &number1, &number1, &number3, &number4);
//in this case, c will return 4.
I just want to know why it returns such values depending on the number of arguments.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…