1.[30] Write a program which takes 3 x 3 matrix whose each element is in the range 1 to 9, each number used only once, as input from the user and checks whether it is magic square matrix or not. A magic square matrix is one in which sum of all three rows, all three columns, and the two diagonals is equal. Finally if it is magic square matrix output its sum of rows. Your program should also check whether the inputted matrix is in the correct format or not, i.e. all the entries should be in the range 1 to 9 and each entry should be used only once. 2. [30] In ancient Greece, Eratosthenes gave the following algorithm for determining all prime numbers up to a specified number M. Write down the numbers 2, 3, ..., M. Cross out numbers as follows: Start with 2, keep it but cross out all multiples of 2 (i.e., cross out 4, 6, 8, ...). In this way, suppose you have just processed the number p, then go on to the next number that is not crossed out say q. Keep q, but cross out all multiples of q. After you have finished all the crossing out, the numbers remaining are primes. Write a C program to accept the limit M as input from the user and use array (one or more) of suitable data type to print out the prime numbers. Hint: Use a binary array of size M for implementing the process. Initially all the elements of the array will be 0 (which represents that no element has been cut out). Make the element 1 as you cut that element out. Finally once the whole process is complete output the elements which are still 0. 3. [40] Input a 4 x 4 matrix from the user and then sort the matrix first row wise and then column wise. Write two sorting functions one for sorting the row and the other for sorting the column. Each sorting function will take the 2 dimension array and the index of the corresponding row/column to be sorted as arguments and will sort the matrix. Now sort the original array with the help of these two functions.