Question

Write a C++ program to demonstrate exception handling by using matrix multiplication operation. Matrix multiplication function should notify if the order of the matrix is invalid, using exception.

25 Nov 2017
Answer :
Word Count : 192

#include<iostream.h>

#include<conio.h>

#include<process.h>

#include<exception.h>

void matsum()

{

int m, n, i, j, first[10][10], second[10][10], sum[10][10];

try

{

cout << "Enter the number of rows and columns of matrix ";

cin >> m >> n;

cout << "Enter the elements of first matrix\n";

if (m>10 || n>10)

//exit(0);

throw 1;

}

catch(int)

{

cout<<"subscript invalid";

}

for ( i = 0 ;

_________ _____ __________ __________ ________ ___ ____ _____ ______ ______ __________ ______.
___ ________ ____ ________ ___ ________.
____ ________ ________ _____ _____ ___ __________.
_________ __________ ___ ________ ___ _______ ________.
_______ _____ ________ ______ ________ __________ ________ __________ ______ _______ ____ ________.
_________ _________ ______ _________ __________ _____ _________.
_________ _________ _______ _______ ________ __________ __________ ___ _______ ________.
_______ _____ _______ _________ _________ ________ _________ ________ __________ _________ _______ ____.
______ ____ ________ ________ ________ ___ ______ ______.
_________ _____ ________ _________ ________ _____ _______ ________ _________ _______ __________.
____ ______ __________ __________ ________ ___ __________ ___ ______.
____ _____ ______ __________ __________ _________ _______ _____ ________ __________ ________.
_________ _________ __________ ___ ___ __________ __________.
_____ _________ _________ ______ _______ __________ ________ _________.
__________ ________ ______ ____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU BCSL 32 2016 - Write a C++ program to demonstrate exception handling by using matrix | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→