Assignment Set 2 (Uploaded on August 08, 2014) Clarification deadline date: August 11, 2014 Submission deadline date: August 14, before lab starts Problem 1: Write a C program that takes as input a positive integer 'n' and generates a matrix of size 2^n x 2^n using pointer to pointer. Fill the matrix in a row major order with integers in the range [1,2^(2n)]. Write a recursive function to print the matrix in a spiral fashion. Problem 2: Write a C program to dynamically allocate an array A of size n x m. n and m are inputs to be taken from the user. The array A is treated as a maze in which a mouse is trying to find its way. A[i][j]=0 indicates that the mouse can step onto the location (i,j) and A[i][j]=1 indicates that the mouse can't step onto the location (i,j). A mouse starts from A[0][0] and has to reach A[n-1][m-1], by passing only through positions that are set to 0. A mouse can move in any of the 8 directions -- N, S, E, W, NE, NW, SE, SW provided that those locations have a 0 and they are valid array entries. You have to write a recursive program that finds the path of the mouse if such a path exists. The array entries of A are to be generated randomly. --------------------------------------------------------------- Naming conventions for program files. xx is your roll number: For Problem 1: The name of the src file for problem 1 of assignment 2 should be ``cs14xx-assign2-src-prog1.c''. The name of the app file for problem 1 of assignment 2 should be ``cs14xx-assign2-prog1.c''. The name of the include file for problem 1 of assignment 2 should be ``cs14xx-assign2-prog1.h''. For Problem 2: The name of the src file for problem 2 of assignment 2 should be ``cs14xx-assign2-src-prog2.c''. The name of the app file for problem 2 of assignment 2 should be ``cs14xx-assign2-prog2.c''. The name of the include file for problem 2 of assignment 2 should be ``cs14xx-assign2-prog2.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: --------------------------------------------------------------------*/