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...

WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS

Answer Posted / akshay sharma

#include<stdio.h>
#include<conio.h>
main()
{
int a[2][2],b[2][2],c[2][2],i,j,k;

for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&a[i][j]);
}
}

for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&b[i][j]);
}
}
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{


c[i][j]=a[i][j]*b[i][j];

}
}

for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
printf("%d",c[i][j]);
}
}
}

Is This Answer Correct ?    10 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what does the function toupper() do?

1023


What is the difference between exit() and _exit() function in c?

1038


Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given

3030


What is the difference between declaring a variable and defining a variable?

1210


Is c still relevant?

1051


what do the 'c' and 'v' in argc and argv stand for?

1130


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2314


What is new line escape sequence?

1285


What are the back slash character constants or escape sequence charactersavailable in c?

1151


what do you mean by inline function in C?

1026


Which control loop is recommended if you have to execute set of statements for fixed number of times?

1313


Is c programming hard?

985


Is c dynamically typed?

1109


Why is structure padding done in c?

1094


What are c preprocessors?

1141