Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void copy_arr(double source[], double target1[], int num);
- int main(void){
- double source[][2]={{1,2},{3,90}};
- double target[2][2];
- int rows,cols;
- for (rows=0; rows<2; rows++){
- copy_arr(source, target, 4);
- }
- for(rows=0; rows<2; rows++){
- for(cols=0; cols<2; cols++){
- printf("%f ", target[rows][cols]);
- }
- printf("\n");
- }
- return 0;
- }
- void copy_arr(double source[], double target1[], int num){
- int i;
- for(i=0; i<num; i++){
- target1[i]=source[i];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement