http://www.facweb.iitkgp.ernet.in/~spp/tut291007.html

Consider a set of employees whose records are maintained about (i) Name: 50 characters (ii) Age: Integer (iii) Address: 150 characters (iv) Salary: Integer (v) email address: 20 characters and (vi) url: 40 characters

Define a variable number of such records stored in a suitable structure by dynamic allocation of the specified number of records. You may store them using an array of such records.

We wish to access these records by sorted order of each attribute. So, we need KEYS, in the form of arrays, to have the orders realized. For instance, KEYNAME will be an array such that KEYNAME[i] points to the structure which has ith name in lexicographic order. Similarly, KEYURL[i] will point to the structure with ith lexicographic url and KEYSAL[i] will point to the item with ith smallest salary.

DO THE FOLLOWING for ASSIGNMENT 9:

(1) Write a complete C program with separate functions to structure your program for input, output, and processing, as required below.

(2) Use suitable sorting steps for sorting against each attribute (based on details of its type declarations), and printing the sorted lists with respect to each attribute.

(3) Print all anti-correlating pairs between AGE and SALARY.

(4) Print all correlating pairs between AGE and SALARY.

(5) Print all pairs that are correlated between AGE and SALARY but anti-correlated between AGE and NAME.

(6) Print all triples that are correlated between AGE and SALARY.