Write a C program which solves the following problem: The input to the program is a 1D integer array A with its size S and the dimensions M and N of a 2D integer array. The output must be a 2D array B of size MxN into which the elements of the 1D array A are placed in the following way: B[0][0] = A[0] B[0][1] = A[1] B[1][0] = A[2] B[0][2] = A[3] B[1][1] = A[4] B[2][0] = A[5] B[0][3] = A[6] B[1][2] = A[7] ..... etc. That is, you will scan the array A from beginning to end and write each element to the correct location in B (Note the diagonal tracing fashion follwed in B). If MxN is larger than S, you will fill the remaining locations with 0. If S is larger than MxN, you will stop when B is exhausted. The followings are sample inputs and outputs: Input: Output: A = [ 4 6 9 5 4 7 ] B = [ 4 6 S = 6 9 5 ] M = 2 N = 2 Input: Output: A = [ 4 6 9 5 4 7 ] B = [ 4 6 5 S = 6 9 4 0 M = 3 7 0 0 ] N = 3 Input: Output: A = [ 4 6 9 5 4 7 ] B = [ 4 6 5 S = 6 9 4 7 ] M = 2 N = 3 Input: Output: A = [ 4 6 9 5 4 7 ] B = [ 4 6 S = 6 9 5 M = 3 4 7 ] N = 2