Programming Contest - Lab Test Gnunify'12 1. Write a C program, called reverse, to take a file as input then copies it to another file in reverse order.That is, the last byte becomes the first, the byte just just before the last onebecomes the second, etc. example:- # ./reverse /etc/passwd /tmp/reversepasswd 2. Write a program prog2.c in C to perform the following tasks:- - It reads in two command line arguments and converts them to two integers. This means prog2.c is run with the following command line:- # prog2 m n where m, n and r are two positive integers. Then, the main program forks two child processes, waits for their completion, and exits. - The first child process generates m random integers with C functions srand() and rand() into a local array. Each number should be scaled to the range of 0 and 99. For example, rand()%100 would do the trick. Then, this process does the following in this order: - Prints the generated random integers - Uses any sorting method to sort this array - Prints the sorted array - The second child process computes the n-th Fibonacci number fn with recursion. This process does its task in the following order: - Prints the value of n - Uses recursion to compute fn - Prints the result. example:- # ./prog2 5 10 Random Numbers Generated: 13 5 67 43 99 Sorted Sequence: 5 13 43 67 99 Input Number for Fibonacci is 10 Fibonacci Number f(10) is 55 3. Write a Program that creates a Zombie and then call system command to execute "ps" command to verify that the process is zombie.