696___________________________________________ 1

         
 :

		
stdin	0	     
stdout	1	     
stderr	2	    

           
.

,    ,    io.h.  
        stdio.h, fcntl.h, sys\ types,
 sys\stst.h.

   open,    :

tfinclude <fcntl.h>

#include<io.h>

int openlconst char *path, int access, unsigned mode);

 path    .  access 
    .  mode     
  .

 access    (|)   .  ?
   (  .   14   14.12.1):

ORDONLY   

0_WRONLY   

0_RDWR    

0_CREAT   

0_TRUNC   ,    

0_BINARY  

0_  

 mode   :

S_IWRITE                          
S_IREAD                           
S_IREAD | S_IWRITE                  

, 

int handle;

if ((handle = open("Test.txt", 0_CREAT I 0_TEXT)) == -1)
{

ShowMessage("   ");

return;

}

    ,     ( open 
 -1)    .