fscanf.c 301 B

12345678910111213
  1. //@ 1 2 3
  2. //@ SS
  3. #include <stdio.h>
  4. int main() {
  5. FILE *f = fopen("stdio/fscanf.c", "r");
  6. int x, y, z;
  7. fscanf(f, "//@ %d %d %d",&x , &y, &z);
  8. printf("%d %d %d %ld\n", x, y, z, ftell(f));
  9. while(-1 != fscanf(f, "%*[^\n]")) {
  10. printf("%ld\n", ftell(f));
  11. getc(f);
  12. }
  13. }