Two dimensional arrays

The array which is using two subscripts is known as 2 – dimensional array. It is a collection of rows and columns. The two dimensional array is nothing but matrix which is arranged the elements in rows and columns.
Syntax:-Data_type array_name[row subscript][column subscript];
ex:- int a[2][2];
The matrix allocated memory is equal to given datatype size 2 rows X 2 columns. The matrix index is starts from(0,0) and ends at (n-1,m-1). Where n is no.of rows and m is no.of columns.

Write A Program on two dimentional array declaration, initialization and printing program.




output















Write A Program declaration cum initialization and printing program.


(or)


output




Write a Program on two dimentional array reading and printing program.



output














Write A Program read a dimentional array values and print the transpose of the given matrix.





output


Wap read  two dimentional array values and calculate the sum and printing program.

































output


Wap read two dimensional array values and calculate the product and printing program

output


No comments:

Post a Comment