Mega Code Archive

 
Categories / C / File
 

Get the next int value from a stream

/* putw/getw example */ #include <stdio.h> int main () {   FILE *file;   int i;   file = fopen ("my.bin","wb+");   putw (20,file);   rewind (file);   i=getw (file);   fclose(file);      return 0; }