You are on page 1of 3

#include<stdi0.

h>
# 1nclude<aya/types.h>
#include<sys/stat.h>
#include <fcnt1. h>
int main ()
int fd
char name [40];
scanf ("$s",<name);
acreat ("name",0_CREAT|0_RDUR)
if (fd-=-1)
print f ("error")
else
print f ( "the file is sucssesfully")
return 0:

"creat function.c" 15L, 248C 9,1

Local Pause T500 7-Bit 1 1t009, 001) Overstrike Hode

start emtallk (untitled) teemtalkas (untitled)


"openfumction.c" 17L, 273C uritten
21CS002419@localhost ]$ gcc openfunction.c
21CS0024198localhost 1$/a.out
fd-1
error no. 0
121CS0024198localhost -]
Overstrike Hode
Local Pause VT500 7-Bit 1 1t024,027)
star eemtalko (Untiled) teemtalk® (Unttled).
E Culo
F L1506
Oteemtalk® (Untitled) 172.16.44.251
File Edit Settings
#include tcnt1. h>
int main)
int fdi open("closefunction.c",0_RDONLY)
it(td1<0)
printf("error") ;
else
print("sucessfull un") ;
return 0
"close function. c" 13L, 204C written
121CS0024190localhost ]$ gcc closefunction.c
(21CS002419@localhost ]$ ./a. out
Sucessfull run[21Cs00241981ocalhost 18
Local PauseVTS00 7-Bit 1 1(024,041) Overstrike Hode
start teemtalko(Untled) teemtalko (Untitled)

You might also like