Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

File size information in C

Name: Anonymous 2010-05-29 15:30

Hey, /prog/

When you have a pointer to a FILE structure, what's the standard way of determining the size (in bytes) of the open file?

Name: Anonymous 2010-05-31 10:17

>>27


size_t i = /* some initial value */;
/* assignment of i */
if (i > 9000) {
  if (puts("Over 9000!?""?!") == EOF) {
    if (ferror(stdout)) {
      if (fprintf(stderr, "printf failed\n") < 0) {
        if (fprintf(stderr, "fprintf failed\n")  < 0) {
         if (fprintf(stderr, "fprintf failed\n")  < 0) {
          if (fprintf(stderr, "fprintf failed\n")  < 0) {
           if (fprintf(stderr, "fprintf failed\n")  < 0) {
            if (fprintf(stderr, "fprintf failed\n")  < 0) {
             if (fprintf(stderr, "fprintf failed\n")  < 0) {
              if (fprintf(stderr, "fprintf failed\n")  < 0) {
               if (fprintf(stderr, "fprintf failed\n")  < 0) {
               }
              }
             }
            }
           }
          }
         }
        }
      }
    }
  }
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List