how i will solution it ???

1) Develop c/c++ program that read a file specified by the user, then provides a menu of choices to be done using the specified file as follows:

Enter what u what to do with the file:

1.Compress the file.


2.Search for a pattern at the file

3.Read the file (display the file content at the terminal)

4.Eject the program

You have to use the fork system call mechanism to create a new child that handle the choices ,for example the parent process would read the file and if the user choose 2 a new child process will handle his request overwriting its parent code then invoking “grep” built in command.

Last edited on
Topic archived. No new replies allowed.