problem 1)a)(i) Distinguish between realloc() and malloc() function in C.
(ii) Describe the purpose of each of the following declarations
1. int *p;
2. int (*p) ;
3. int p (char *a);
4. int *p (char *a);
b) prepare a C program using pointers to read the array of integers and prints its elements in descending order.
problem 2)a) Differentiate union and structure. For what types of applications are unions useful?
b) Describe with suitable exs self referencing structure.
c) Describe nesting of structure with suitable ex. Can union be member of Structure and structure be a member of union? If yes, give suitable ex.
problem 3)a) What do you mean by the array of structures? Describe with appropriate ex.
b) Describe how to pass entire structure as parameter to function and how to return a structure from function.
c) Define a structure called Inventory that will describe following information:
Purchase_Date is member of another 'Date' structure. Using Inventory create array of items and prepare a C program to read the information about all items. While displaying final list find out and display the purchase price for each shipment. Sort the list in ascending order of Item_No.
problem 4)a) prepare a C program to count number of spaces on each line of text in a file.
b) Describe the following file handling functions in C with appropriate ex:
problem 5)a) prepare down the difference between text mode and binary mode.
b) prepare a C program to read integer number from user and display it in binary format using bitwise operator.