Assignment Set 2 (Uploaded on July 25, 2013) Deadline date: August 1, before lab starts Assignment 1: Write two C programs to do the following. (a) Take as input a positive integer 'n' from the user. Compute the Fibonacci number corresponding to 'n' in a iterative fashion. (b) Take as input a positive integer 'n' from the user. Compute the Fibonacci number corresponding to 'n' in a recursive fashion. Compute the number of function calls to any 'fib(i)', where 0<=i<=n. In both cases, check what is the largest 'n' for which you can find the Fibonacci number. For any particular 'n', compute and compare the real times taken by the iterative and recursive versions of the program. Assignment 2: Write a C program that takes as input four positive numbers -- row1, col1, row2, col2 and allocates space dynamically for two arrays A and B using pointer to pointer. A should be of size row1Xcol1 and B should be of size row2Xcol2. Now, if col1 equals row2, multiply matrices A and B to generate another matrix C. Print the matrix C properly. ---------------------------------------------------------------------- Naming conventions for multiple files: For Problem 1: Suppose you have a file which contains "main" and the names of other files as 'x1.c', 'x1.h', 'x2.c', 'x2.h', ... then you should name them as 'july25-p1-yourname-main.c', 'july25-p1-yourname-x1.c', 'july25-p1-yourname-x1.h', 'july25-p1-yourname-x2.c', 'july25-p1-yourname-x2.h', .... For Problem 2: Suppose you have a file which contains "main" and the names of other files as 'y1.c', 'y1.h', 'z.c', 'z.h', ... then you should name them as 'july25-p2-yourname-main.c', 'july25-p2-yourname-y1.c', 'july25-p2-yourname-y1.h', 'july25-p2-yourname-z.c', 'july25-p2-yourname-z.h', .... ----------------------------------------------------------------------- At the top of each of your program files, add the following. If you are writing multi-file programs, then each file should have it. /*------------------------------------------------------------------ Name: Roll Number: Date of Submission: Deadline date: Program description: Acknowledgements: --------------------------------------------------------------------*/