Tuesday, November 4, 2014

Write a c++ program to add two matrix using 2-D arrays.
Concept used:
const int (Important concept here for array size)
2D arrays
Nested for loops

Program explanation:
For 2D array size there must be constant value in square brackets like
array[constant value][constant value]
Two const variables row and col are used to define size
if we do not make both const then error found because without const reserve word they are
behaving as variable.
Before placing both variable in square brackets they must initialized else error will be found
three nested for loops are used two for taking input in matrix 2D arrays and one for resultant matrix
I want to see your sample code.

No comments:

Post a Comment