0% found this document useful (0 votes)
4 views2 pages

Lab3 Files

The document outlines instructions for Lab 3 of the CSE3070 - UNIX Programming course at Inha University Tashkent for Spring Semester 2025. Students are required to complete individual assignments involving C programming tasks related to file manipulation and data processing in a Unix environment, with a strict submission deadline of March 2, 2025. The tasks include finding and replacing decimal values with binary representations, reversing file content, counting specific letters, and processing command-line arguments for file operations.

Uploaded by

glubalacc05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Lab3 Files

The document outlines instructions for Lab 3 of the CSE3070 - UNIX Programming course at Inha University Tashkent for Spring Semester 2025. Students are required to complete individual assignments involving C programming tasks related to file manipulation and data processing in a Unix environment, with a strict submission deadline of March 2, 2025. The tasks include finding and replacing decimal values with binary representations, reversing file content, counting specific letters, and processing command-line arguments for file operations.

Uploaded by

glubalacc05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

INHA UNIVERSITY TASHKENT DEPARTMENT OF

CSE & ICE


SPRING SEMESTER 2025
CSE3070 - UNIX PROGRAMMING
Lab 3
INSTRUCTIONS :

1. All Lab assignments are to be completed by an individual student on his/her computer


system and not in groups
2. Screen shots are to be provided wherever necessary
3. Lab Assignment Report should be prepared. As a template use standard university template
wherever necessary.
4. Last date for submission of the Lab Assignment is 02/03/25 - Late submissions not
entertained, Adhere to the deadline strictly

Assignments:
Using C language for Unix environment implement the following task:

Task 1.

In arbitrary plain text file find all decimal values which are on even positions and substitute them
with their binary representations. (consider 0 as even);

NOTE maximum length of binary representation can’t exceed 8 bits.

Task 2.

For any given regular file reverse it second half.


Task 3.

For arbitrary plain text file find number of letters “A or a”, “B or b” and “C or c” in this
file.

Task 4.

When first started, your program must check to see if the user provided a command-line
argument. If so, then your program must treat the command-line argument as a file name,
and repeatedly must:

• Read a line from the file with the given name.


• Print the line, preceded by a percent sign and a space, to stdout.
• Lexically analyze the line to create an array of tokens.
• Syntactically analyze (i.e. parse) the token array to create a command.

Notice:

To work with files you can use only open, read, write, lseek, close functions.

You might also like