answersLogoWhite

0


Best Answer

#include main() { int array[100], minimum, size, c, location = 1; printf("Enter the number of elements in array\n"); scanf("%d",&size); printf("Enter %d integers\n", size); for ( c = 0 ; c < size ; c++ ) scanf("%d", &array[c]); minimum = array[0]; for ( c = 1 ; c < size ; c++ ) { if ( array[c] < minimum ) { minimum = array[c]; location = c+1; } } printf("Minimum element is present at location number %d and it's value is %d.\n", location, minimum); return 0; }

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to copy one matrix to another matrix?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you write a java program to find the transpose of the matrix for the given elements?

You basically write a nested for loop (one for within another one), to copy the elements of the matrix to a new matrix.


How can you write a program which proves that a multiple of a matrix and its determinant is an identity matrix?

Automated proofs are a complicated subject. If you are not an expert on the subject, all you can hope for is to write a program where you can input a sample matrix (or that randomly generates one), and verifies the proposition for this particular case. If the proposition is confirmed in several cases, this makes the proposition plausible, but is by no means a formal proof.Better try to prove it without writing any program.Note: it is not even true; it is the inverse of the matrix which gives identity when is multiplied with the original matrix.


What relates to how much one module in a program must rely on another?

Linkage relates to how much one module in a program must rely on another


How did copy string one variable to another variable in body of the program in c?

/*Program to Copy one string to another using pointer.*/#include#includemain(){char a[80],b[80],*pa,*pb;int i=0;clrscr();printf("Given first string ");scanf("%s",a);pa=&a[0];pb=&b[0];while(*pa!='\0'){*pb=*pa;pa++;pb++;}*pb='\0';printf("\nCopied string is");puts(b);}


Can you swap two matrix?

Provided both matrices are mutable, two matrices A and B can be swapped like any other two items: create temporary storage to store a copy of A, then assign B to A, and finally assign the temporary copy of the previous version of A to B. Note that in the C programming language, matrices cannot be assigned to each as such. One implementation of this algorithm might operate on the basis of references (pointers), and can thus swap two matrix references by swapping two pointers in the manner detailed above. Implementations wishing to actually transfer the data held in one matrix to another would use a library function such as memcpy() to transfer data.

Related questions

How do you write a java program to find the transpose of the matrix for the given elements?

You basically write a nested for loop (one for within another one), to copy the elements of the matrix to a new matrix.


Where can you buy a DVD copy of the Matrix?

There are many places online where one can buy a copy of The Matrix on DVD. Some of these include Amazon and eBay. One can also find it for sale on the WalMart website.


Can you copy pictures from one licensed commercial program to another in-house program to be used at multiple sites?

Not without permission. The EULA of the original program probably spells this out.


Where can one download a direct copy of The Matrix online?

One can download a direct copy of The Matrix online from iTunes. iTunes can be downloaded from the Apple website free of charge. A small fee will be required to download the movie.


Is there another Matrix movie in production?

No. It seems that Matrix Revolutions (2003) will be the last one.


How do you copy an installed program from one hard drive to another hard drive?

i'm sorry that's not possible. you cant hover the installer program on to a hard disk but not a previously installed program.


Can a 3 X 4 matrix be multiplied by a 4 X 1 matrix?

Yes. If one matrix is p*q and another is r*s then they can be multiplied if and only if q = r and, in that case, the result is a p*s matrix.


How do you copy a dos file from one location to another?

"copy &lt;source&gt; &lt;destination&gt;"


Write a program to copy the contents of one file to another?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; int main(int x,char *a[]) { FILE *fp1,*fp2; fp1=fopen("input.txt","r"); fp2=fopen("output.txt","w"); while(!(feof(fp1))) { fputc(fgetc(fp1),fp2); } fclose(fp1); fclose(fp2); return 0; }


How can one copy a DVD on to another DVD?

There are many programs to copy the content of a DVD from a DVD to a storage device. The easyest way is creating a .iso file, for example via ImgBurn. This program copys the data, creates a .iso file and lets you burn another DVD using the .iso file.


How can you write a program which proves that a multiple of a matrix and its determinant is an identity matrix?

Automated proofs are a complicated subject. If you are not an expert on the subject, all you can hope for is to write a program where you can input a sample matrix (or that randomly generates one), and verifies the proposition for this particular case. If the proposition is confirmed in several cases, this makes the proposition plausible, but is by no means a formal proof.Better try to prove it without writing any program.Note: it is not even true; it is the inverse of the matrix which gives identity when is multiplied with the original matrix.


Copy and paste from one document to another by using the process of?

how much is the ticket for copy and paste