Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

to find the program of matrix multiplication using arrays

Answer Posted / suman kumar das.

//matrix multiplication program
#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();
int i,j,k,a[3][3],b[3][3],c[3][3],sum,m=3,l=3;

printf("\n enter value of first matrix:\n");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
scanf("%d",&a[i][j]);
}
printf("\n enter value of second matrix:\n");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
scanf("%d",&b[i][j]);
}
for(i=0;i<m;i++)
{
for(j=0;j<l;j++)
{
c[i][j]=0;
for(k=0;k<l;k++)
c[i][j]+=a[i][k]*b[k][j];
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
printf("%d",c[i][j]);
}
getch();

}

Is This Answer Correct ?    24 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is d'n in c?

1119


How can I generate floating-point random numbers?

1129


What is the difference between constant pointer and constant variable?

1220


Is null always equal to 0(zero)?

1032


What are the uses of a pointer?

1151


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1112


What is pivot in c?

1024


What would be an example of a structure analogous to structure c?

996


What is array within structure?

1115


write a program to copy the string using switch case?

2895


What does the error 'Null Pointer Assignment' mean and what causes this error?

1215


Explain union. What are its advantages?

1077


How can a program be made to print the line number where an error occurs?

1082


Why clrscr is used in c?

1014


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3711