0 Bewertungen0% fanden dieses Dokument nützlich (0 Abstimmungen)
12 Ansichten2 Seiten
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) Also calculate and compare the time taken by each of the above and which is better. Write a program which takes directory name as input and deletes all files, within that directory. Compare and contrast perror( ) and stderror(
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) Also calculate and compare the time taken by each of the above and which is better. Write a program which takes directory name as input and deletes all files, within that directory. Compare and contrast perror( ) and stderror(
Copyright:
Attribution Non-Commercial (BY-NC)
Verfügbare Formate
Als DOC, PDF, TXT herunterladen oder online auf Scribd lesen
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) Also calculate and compare the time taken by each of the above and which is better. Write a program which takes directory name as input and deletes all files, within that directory. Compare and contrast perror( ) and stderror(
Copyright:
Attribution Non-Commercial (BY-NC)
Verfügbare Formate
Als DOC, PDF, TXT herunterladen oder online auf Scribd lesen
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.