Get the next int value from a stream: how to use getw and putw
/* 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; }