#include<time.h>
#include <io.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
int main(){

int fh=_open("unko","_O_BINARY|_O_CREAT|_O_WRONLY |");
srand(time(NULL));

for(int i=0;i<100;i++){
int j=rand();
_write(fh,&j,sizeof(int)),
}
_close;
int I[100];
_open("unko",_O_BINARY|_O_RDONLY);
for(int i=0;i<100;i++)
{
_read(fh,&I[i],sizeof(int));
}
_close(fh);
}
http://www.microsoft.com/japan/developer/library/vccore/_crt__open.2c_._wopen.htm