See the usage of the following commands online. Also run them on the terminal.
- pwd
- ls
- cd
- cp
- mkdir & rmdir
- man
- sudo
- apt-get
- kill
- ping
- grep
- mount
- unmount
b. Place the signature of the function in a header file named util.h, and place the implementation of the function in a cpp file named util.cpp
c. Now create a main.cpp file containing the main function which calls the function created previously. (For input file, create a random text file containing alphanumeric characters)
Write a C++ which perform following tasks.
Create a parent and child process using the fork command where the child tells if the number is odd or not and parent process will write the number on screen.
Write a C++ which performs following tasks.
Create a parent and child process using the fork command where the child process will calculate
the first 15 numbers in Fibonacci series and parent process will write those numbers on screen
Create a program named stat that takes an integer array as command line argument (deliminated by some character such as $). The program then creates 3 child processes each of which does exactly one task from the following:
- Adds them and print the result on the screen. (Done by child 1)
- Shows average on the screen. (Done by child 2)
- Prints the maximum number on the screen. (Done by child 3)