home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / WATCOM_C / WAT63.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-21  |  596 b   |  26 lines

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat63.c                                              */
  3. /*------------------------------------------------------------------*/
  4. #include <stdio.h>
  5. #include <fcntl.h>
  6. #include <io.h>
  7.  
  8. void main()
  9. {
  10.    int handle;
  11.    char ch;
  12.  
  13.    handle = open("MYFILE.TXT",O_RDONLY);
  14.  
  15.    if (handle != -1)
  16.    {
  17.        /* ▒q└╔«╫ññ│vñ@ªrñ╕┼¬¿·¿├ªCÑ▄¬╜¿∞└╔«╫╡▓º└ EOF ¼░ñε */
  18.        while (!eof(handle))
  19.        {
  20.           read(handle, &ch, 1);
  21.           printf("%c", ch);
  22.        }
  23.    close(handle);
  24.    }
  25. }
  26.