0% found this document useful (0 votes)
17 views

ATA Tructures: Atch Hursday Anuary Ssignments ODE Otes

This document provides instructions for an assignment on data structures involving a 6x9 matrix. It includes 6 problems: 1) print the transpose of the matrix, 2) identify and print the symmetric 3x3 submatrix and its transpose, 3) count paths in the matrix between elements moving right/down and print elements on qualifying paths, 4) identify two columns where one is twice the other, 5) find two rows where the first's sum is the reverse of the second's and print the rows and their transpose with sums, 6) construct a one-zero matrix from the given matrix by removing non-1 elements and padding smaller rows with zeros. Students are instructed to solve all problems in a single .c file named for

Uploaded by

pradeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

ATA Tructures: Atch Hursday Anuary Ssignments ODE Otes

This document provides instructions for an assignment on data structures involving a 6x9 matrix. It includes 6 problems: 1) print the transpose of the matrix, 2) identify and print the symmetric 3x3 submatrix and its transpose, 3) count paths in the matrix between elements moving right/down and print elements on qualifying paths, 4) identify two columns where one is twice the other, 5) find two rows where the first's sum is the reverse of the second's and print the rows and their transpose with sums, 6) construct a one-zero matrix from the given matrix by removing non-1 elements and padding smaller rows with zeros. Students are instructed to solve all problems in a single .c file named for

Uploaded by

pradeep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DATA STRUCTURES

BATCH B

[THURSDAY JANUARY 19, 2017: 2:00 PM 5:00 PM]


CODE: assign02

ASSIGNMENTS 2

NOTES:
1) Please carefully read all assignments and there is no choice.
2) Each problem in this assignment has to be answered in the same c file.
3) Create a .c file following the file name convention:
If your roll number is abc and assignment code is: assign02
Then use the following file name convention as follows: abc-assign02.c
For example, if the roll number is 92 and assignment code is assign02, then
the file name should be 092-assign02.c
4) Strictly follow the file name convention.
5) Do not use scanf() or do not use unnecessary print statement. Just print only
those you are asked to do in each assignment.
---------------------PROBLEMS [Total Marks: 25]:
Consider the following 6 x 9 matrix:
2

16

12

1) [Marks: 2 marks]
Read the matrix and print the transpose of the matrix
2) [Marks: 6 marks]
Symmetric: A square matrix A = [aij] is symmetric if aij = aji for all i and j
with 1 i n and 1 j n
From the given matrix:
a) Identify the symmetric matrix of size 3 and print the same.
b) Print the transpose of this symmetric matrix.

3) [Marks: 5]
Write a program to count the number of paths (> 4) in the 2-d matrix between
any x x such that each path is to be made up of a pass through an odd and
an even number alternatively from x to x and each step is a move one unit to
the right or a move one unit downward. (No moves to the left or upward are
allowed). Also print the elements on the path (space separated).
4) [Marks: 4]
Identify any two columns in such a way that the element of one column is
simply twice the value of elements of the second column.
5) [Marks: 5]
Find two rows in such a way that the sum of first row would be a mirror image
of the sum of the second row. For example, if the sum of the first row is 12
then the sum of the second row should be 21.
Now
a) Print these two rows
b) Print the transpose of these two rows with their sum at the end.
6) [Marks: 3]
Construct a one-zero matrix from the above matrix in such a way that the
given matrix is reduced by removing numbers other than 1 in each row and
then by adding zero to the tail of each smallest row so as to make it as a zeroone matrix.
----------------------

You might also like