answersLogoWhite

0

Maybe it does execute, but in a temporary MS-DOS window, which is closed when program's terminated. Run your program from a separate MS-DOS window (Start/Run: CMD.EXE)

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How do you run dev-c plus plus on Windows 8?

I don't run either DevCPP or Windows 8. However, I did some checking around and found the following answers. The related links to them are provided beneath this answer.1) Run DevCPP in Windows XP Compatibility Mode: right-click the icon and select "Run in earlier versions of Windows"2) Update DevCPP (see the SourceForge related link below)The problem seems to be that you're running an outdated version of MinGW GCC.If neither of the above answers help, try a Web search for devcpp "windows 8" or devc++ "windows 8".Also, keep in mind that Windows 8 is still in beta development, so expect errors and problems to crop up. I'd recommend sticking with earlier Windows versions until at LEAST a service pack gets released if you continue to encounter technical difficulties and are unable to find answers on the Web.


How do you write a functions using pointers to multiply two matrices and return it to the calling function?

void main(){int a[10][10],b[10][10],c[10][10],i,j,k,m,n,p,q;printf("Enter The Rows And Cloumns And Of The First Matrix:");scanf("%d %d",&m,&n);printf("\nEnter The Rows And Cloumns And Of The Second Matrix:");scanf("%d %d",&p,&q);printf("\nEnter Elements Of The First Matrix:\n");for(i=0;i< m;i++){for(j=0;j< n;j++){scanf("%d",&a[i][j]);}}printf("\nEnter Elements Of The Second Matrix:\n");for(i=0;i< p;i++) {for(j=0;j< q;j++)scanf("%d",&b[i][j]);}printf("The First Matrix Is:\n"); /* Print the first matrix */for(i=0;i< m;i++) {for(j=0;j< n;j++)printf(" %d ",a[i][j]);printf("\n");}printf("The Second Matrix Is:\n"); /* Print the second matrix */for(i=0;i< p;i++) {for(j=0;j< q;j++)printf(" %d ",b[i][j]);printf("\n");}if(n!=p) {printf("Aborting./nMultiplication Of The Above Matrices Not Possible.");exit(0);}else {for(i=0;i< m;i++) {for(j=0;j< q;j++) {c[i][j] = 0;for(k=0;k< n;k++) {c[i][j] = c[i][j] + a[i][k] * b[k][j];}}}printf("\nThe Product Of The Two Matrices Is:\n\n");for(i=0;i< m;i++) {for(j=0;j< q;j++) {printf(" %d ",c[i][j]);}printf("\n");}}return 0;}-----------------------------------------------------">-----------------------------------------------------The above code is not the solution of Matrix multiplication using pointers.the following code is absolutely correct.void main(){int *a,*b,*c,row1,col1,row2,col2;clrscr();printf("enter rows of 1at matrix");scanf("%d",&row1);printf("enter columns of 1at matrix");scanf("%d",&col1);printf("enter rows of 2nd matrix");scanf("%d",&row2);printf("enter columns of 2nd matrix");scanf("%d",&col2);if(col1!=row2){printf("\nsorry\n");}else{a = (int *) malloc(row1*col1 * 2);b = (int *) malloc(row2*col2 * 2);c = (int *) malloc(col1*row2 * 2);clrscr();printf("enter 1st matrix \n");insert(a,row1,col1);getch();clrscr();printf("enter 2st matrix \n");insert(b,row2,col2);getch();clrscr();printf("1st matrix is\n");display(a,row1,col1);printf("\n2nd matrix is\n");display(b,row2,col2);prod(a,b,c,row1,col2);printf("\nafter multiplication \n\n\n");display(c,row1,col2);}getch();}insert(int *q,int r,int c){int i,j;for(i=0;i