Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Laboratory Assignment Sheet

Assignment ID
Submission
(as per the Lab Submission Assessment Group/ Weightage-
Date of Deadline
policy Assignment Mode- Method- Individual- Non
Release (Date and
guidelines) - Title- Lab-3 OnLine Grading Individual Graded
time)
03

Instructions (Sample provided below, please change as necessary):

 Download this document and solve them during the laboratory time.
 Insert SAPID and NAME at the top of the sheet before submission

ISHA NIGAM
1000018919

Objective – Study system calls open(), file descriptor and file modes. Write
a program using open() system call to read the first 10 characters of an
existing file “test.txt” and print them on screen.

Hint – files modes are – O_CREAT, O_RDONLY, O_WRONLY, O_RDWR


Laboratory Assignment Sheet

Code –

Text File -
Laboratory Assignment Sheet

Output-

You might also like