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

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat39.c                                              */
  3. /*------------------------------------------------------------------*/
  4. #include <string.h>
  5. #include <stdio.h>
  6. #include <fcntl.h>
  7. #include <io.h>
  8.  
  9. void main()
  10. {
  11.    int handle;
  12.    char buffer[20] = "0123456789ABCDEFGHIJ";
  13.  
  14.    /* ½╪Ñ▀ñ@¡╙ 20 ¡╙ª∞ñ╕▓╒ñjñpñº└╔«╫ */
  15.    if( _dos_open("MYFILE.TXT", O_RDWR,&handle) == 0)
  16.    {
  17.        write(handle, buffer, strlen(buffer));
  18.  
  19.        /* ├÷│¼└╔«╫ */
  20.        if(_dos_close(handle) != 0)
  21.        {
  22.         printf("╡L¬k├÷│¼└╔«╫\n");
  23.        }
  24.        else
  25.        {
  26.         printf("ñwª¿Ñ\\ªa½╪Ñ▀¿├├÷│¼└╔«╫\n");
  27.        }
  28.    }
  29.    else
  30.    {
  31.        printf("╡L¬k╢}▒╥└╔«╫\n");
  32.    }
  33. }
  34.