You are on page 1of 2



Course :Linux Programming Code : CSE207

Date of Assignment: Date of Submission :


Q1. 1.Write a C Program to display a menu and perform respective

tasks ?
*** 1. Search User info by UID ***
*** 2. Search User info by user Name ***
*** 3. Display Info. Of all users ***
*** 4. Quit ***
Enter Your Choice (1-4) . . . . . .

2. Write a C program to display a menu and do following tasks

*** 1. Display System time (low level)
*** 2. Display date in year-month – day format
*** 3. Add current user & time in Log file
*** 4. Display date & time without gmtime()

3. Write a C program to create a temporary file and display its

name and time of creation and name of user who created it.


4. Write a C program to check if any key is hit and make change in the
terminal settings as follows:
c- Switch to canonical mode.
n- Switch to non canonical mode.
s- Does not allow the signal keys like ctrl+D etc.
o- Reset the original settings.
q- Quit from program.
And while waiting for any key to hit it should print the message “Please
press any key”.
5. Write a C program to maintain student record. It should also allocate
memory dynamically for the following structure.
Struct student
Char name [20];
Int Rollno;
Float marks;

The program menu should be:

1. Add new record.
2. Delete a record.
3. Display records.
4. Quit.
The program should de-allocate the memory occupied before exiting from the

Q6 WAP to create a file with name provided as command line argument and place a write lock on