write a program in c language for the multiplication of two
matrices using pointers?
Answer Posted / tutu
#include<stdio.h>
#include<conio.h>
int main()
{
int mul(int,int);
int n1,n2,f=1,ans;
while(f==1)
{
printf("\n***MULTIPLICATION OF TWO NATURAL
NUMBERS***");
printf("\nEnter Two Numbers: ");
scanf("%d %d",&n1,&n2);
if(n1<=0||n2<=0)
{
printf("\nInvalid Choice...");
printf("\nDo You Want To Try
Again...\n1.Yes\n2.No");
scanf("%d",&f);
}
else
{
printf("\nAns = %d",mul(n1,n2),"\n");
printf("\nDo You Want To
Continue:\n1.Yes\n2.No\n");
scanf("%d",&f);
}
}
}
int mul(int a,int b)
{
return((b-1)*a+a);
}
| Is This Answer Correct ? | 19 Yes | 26 No |
Post New Answer View All Answers
what is use of malloc and calloc?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
How we can insert comments in a c program?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
Discuss the function of conditional operator, size of operator and comma operator with examples.
What are the 3 types of structures?
If errno contains a nonzero number, is there an error?
What is I ++ in c programming?
5 Write an Algorithm to find the maximum and minimum items in a set of ānā element.
Explain what does a function declared as pascal do differently?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
What is variable in c example?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
What is volatile variable how do you declare it?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays