Assignment Set 4 (Uploaded on August 19, 2013) Deadline date: September 12, before lab starts Problem 1: [Assignment would be explained in class] Write a C program to do the following. Let X be a static array of size 1,00,000 bytes. An user can block some space in X or free some already booked space. While booking, the user would specify the data type for which he wants to book (e.g. char, int, float, double, etc.) and the number of such spaces. Each time an user blocks a space, an id is assigned to the booking. At any point of time the user can book space, if available or free already booked space corresponding to any previously booked id. After each booking or freeing of space, show what is the amount of total free space. Also show how many chunks of free spaces are available and the sizes of each of them. Problem 2: Write a program in C that represents a polynomial of a single variable in a linked list and stores only those entries that have non-zero co-efficient. With this representation of a polynomial, write functions that (i) adds two polynomials (ii) multiplies two polynomials (iii) evaluates a polynomial at any real value (iv) finds the derivative of a polynomial. ---------------------------------------------------------------------- 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 'august19-p1-yourname-main.c', 'august19-p1-yourname-x1.c', 'august19-p1-yourname-x1.h', 'august19-p1-yourname-x2.c', 'august19-p1-yourname-x2.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: --------------------------------------------------------------------*/