Sie sind auf Seite 1von 2

Assignment # 3

Ques 1: “System calls are better or procedure calls”. Justify

Ques 2: Write a C program to create a file at least of 2 MB with command


ls -R / >file1.txt and move contents of the file to another file using
a) System call(open, read and buffer of 10 KB)
b) Library functions
1. fgets, fputs
2. fgetc, fputc
c) System call(with buffer of 20 bytes)
Also calculate and compare the time taken by each of the above and

which is better.

Ques 3: Write a C program which takes directory name as input and delete
all files, within that directory.

Ques 4: Compare and contrast perror( ) and stderror( ) with examples.

Ques 5: write a C program


a) To input file name and change its permissions to reading by all
and writing by owner only.
b) To create a following tree structure in current directory.

Your Rollno

Previous Rollno Next Rollno

Das könnte Ihnen auch gefallen