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


Please Help Members By Posting Answers For Below Questions

Where are local variables stored in c?

568


how to count no of words,characters,lines in a paragraph.

3897


How can I swap two values without using a temporary?

610


Is linux written in c?

594


Explain high-order and low-order bytes.

661






What does a pointer variable always consist of?

657


What is %d called in c?

752


Explain what is the most efficient way to store flag values?

692


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

642


What are the types of data structures in c?

596


Why do we need arrays in c?

577


What is the use of getchar() function?

622


Explain how do you override a defined macro?

579


application attempts to perform an operation?

1487


Can a file other than a .h file be included with #include?

681