tag:blogger.com,1999:blog-8612108870928357610.post4114391106752913109..comments2024-03-27T12:47:39.371+05:30Comments on Learn C Programming from Scratch: Easy-to-Follow Tutorial for Beginners: C Program to Calculate Matrix MultiplicationUnknownnoreply@blogger.comBlogger7125tag:blogger.com,1999:blog-8612108870928357610.post-17949609343919970762020-06-14T14:48:41.634+05:302020-06-14T14:48:41.634+05:30didn't give outpuut it say
[Error] ld returne...didn't give outpuut it say <br />[Error] ld returned 1 exit statusAnonymoushttps://www.blogger.com/profile/04929493142482525284noreply@blogger.comtag:blogger.com,1999:blog-8612108870928357610.post-44751286842759367692018-05-10T14:36:11.411+05:302018-05-10T14:36:11.411+05:30Hi There,
I learnt so much in such little time a...Hi There,<br /><br /><br />I learnt so much in such little time about C Programming Tutorial. Even a toddler could become smart reading of your amazing articles.<br /><br />I am using 3 vectors each of which is of type struct "ABC". I am trying to find <a href="https://asha24.com/blog/c-interview-questions-and-answers/" rel="nofollow"> duplicates in each vector </a> using equal_range() method. In order for equal_range() to work, the vectors must be sorted. The criteria for sorting each vector is different, therefore, I can't write a single sort method inside the struct "ABC". Is there any way to write different methods for sorting, one for each vector?<br /><br />Appreciate your effort for making such useful blogs and helping the community. <br /><br /><br />Best Regards,<br />VindyaAnonymoushttps://www.blogger.com/profile/10247644687129523815noreply@blogger.comtag:blogger.com,1999:blog-8612108870928357610.post-91664688911219129212015-08-27T11:48:22.856+05:302015-08-27T11:48:22.856+05:30This comment has been removed by a blog administrator.Anonymoushttps://www.blogger.com/profile/03358429835297842200noreply@blogger.comtag:blogger.com,1999:blog-8612108870928357610.post-33166995857892068952015-04-12T21:13:13.216+05:302015-04-12T21:13:13.216+05:30how would you implement the program so that you in...how would you implement the program so that you input the matrix values via text file Anonymoushttps://www.blogger.com/profile/14368422751954886713noreply@blogger.comtag:blogger.com,1999:blog-8612108870928357610.post-58859427198080161542015-04-12T20:59:47.747+05:302015-04-12T20:59:47.747+05:30how would you implement the program so that you in...how would you implement the program so that you input the matrix values via text file Anonymoushttps://www.blogger.com/profile/14368422751954886713noreply@blogger.comtag:blogger.com,1999:blog-8612108870928357610.post-25275481638148797602013-08-12T22:29:02.122+05:302013-08-12T22:29:02.122+05:30Hi U, what are you getting as output? As far as I ...Hi U, what are you getting as output? As far as I can see, please correct IF statement in line no 58.Tanmay Jhawarhttps://www.blogger.com/profile/16070311658147185012noreply@blogger.comtag:blogger.com,1999:blog-8612108870928357610.post-1195037011319808602013-08-11T14:49:54.663+05:302013-08-11T14:49:54.663+05:30#include
#include
#include //used for exit functio...#include<br />#include<br />#include //used for exit function<br />int i,j,k,ch; //Global variable<br />char ch1; //Global variable<br />void main()<br />{ void sub(int a[3][3],int b[3][3],int c[3][3]);<br /> void add(int a[3][3],int b[3][3],int c[3][3]);<br /> void multi(int a[3][3],int b[3][3],int c[3][3]);<br /> void read(int a[3][3],int b[3][3]);<br /> void trans(int a[3][3],int b[3][3]);<br /> void display(int c[3][3]);<br /> clrscr(); //For clearing screen<br /> int a[3][3],b[3][3],c[3][3];<br /> do{<br /> printf("---MATRIX OPERATIONS---\n");<br /> printf("1.Addition\n");<br /> printf("2.Subtraction\n");<br /> printf("3.Multiplication\n");<br /> printf("4.Transpose\n");<br /> printf("5.Exit\n");<br /> printf("Enter your choice-->");<br /> scanf("%d",&ch);<br /> switch(ch)<br /> {<br /> case 1: read(a,b);<br /> add(a,b,c);<br /> printf("\nResultant matrix is\n");<br /> display(c);<br /> break;<br /> case 2: read(a,b);<br /> sub(a,b,c);<br /> printf("\nResultant matrix is\n");<br /> display(c);<br /> break;<br /> case 3: read(a,b);<br /> multi(a,b,c);<br /> printf("\nResultant matrix is \n");<br /> display(c);<br /> break;<br /> case 4: printf("\nEnter the elements in matrix\n");<br /> for(i=0;i<3;i++)<br /> {<br /> for(j=0;j<3;j++)<br /> scanf("%d",&a[i][j]);<br /> }<br /> trans(a,b);<br /> printf("\nTranspose of matrix is given below\n");<br /> display(b);<br /> break;<br /> case 5: exit(0);<br /> default:printf("\nYou Have entered wrong choice\n");<br /> break;<br /> }//End of switch<br /> printf("\nDo you want to continue\a(Y/N)-->");<br /> scanf("%c",&ch1);<br /> if(ch1=='y'||ch=='Y')<br /> printf("Enter your choice again(1-5)-->");<br /> }while(ch1=='y'||ch1=='Y');<br /> getch();<br />}<br />void read(int a[3][3],int b[3][3])<br />{<br /> printf("\nEnter the matrix first matrix\n");<br /> for(i=0;i<3;i++)<br /> {<br /> for(j=0;j<3;j++)<br /> scanf("%d",&a[i][j]);<br /> }<br /> printf("\nEnter the second matrix\n");<br /> for(i=0;i<3;i++)<br /> {<br /> for(j=0;j<3;j++)<br /> scanf("%d",&b[i][j]);<br /> }<br />}<br />void add(int a[3][3],int b[3][3],int c[3][3]) //Fn to add 2 matrices<br />{<br /> for(i=0;i<3;i++)<br /> {<br /> for(j=0;j<3;j++)<br /> c[i][j]=a[i][j]+b[i][j];<br /> }<br />}<br />void sub(int a[3][3],int b[3][3],int c[3][3]) //Fn to subtract 2 matrices<br />{ for(i=0;i<3;i++)<br /> {<br /> for(j=0;j<3;j++)<br /> c[i][j]=a[i][j]-b[i][j];<br /> }<br /><br />}<br />void multi(int a[3][3],int b[3][3],int c[3][3])//Fn to multiply 2 matrices<br />{<br /> for(i=0;i<3;i++)<br /> {<br /> for(j=0;j<3;j++)<br /> {<br /> c[i][j]=0;<br /> for(k=0;k<3;k++)<br /> {<br /> c[i][j]=c[i][j]+a[i][k]*b[k][j];<br /> }<br /> }<br /> }<br />}<br />void trans(int a[3][3],int b[3][3]) //Fn to transpose matrix<br />{ for(i=0;i<3;i++)<br /> {<br /> for(j=0;j<3;j++)<br /> {<br /> b[i][j]=a[j][i];<br /> }<br /> }<br />}<br /><br />void display(int c[3][3])<br />{<br /> for(i=0;i<3;i++)<br /> {<br /> for(j=0;j<3;j++)<br /> {<br /> printf("%d",c[i][j]);<br /> }<br /> printf("\n");<br /> }<br />}<br /><br />//Please help do while statement not workingUhttps://www.blogger.com/profile/05780794325238693477noreply@blogger.com