Advertisement
Guest User

Untitled

a guest
Jul 24th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #define SIZE 5
  3.  
  4. void copy_arr(double [], double [], int);
  5.  
  6. int main(int argc, char *argv[]) {
  7.   double source[SIZE] = {1.1,2.2,3.3,4.4,5.5};
  8.   double target1[SIZE];
  9.  
  10.   void copy_arr(target1, source, SIZE);
  11.  
  12.   return 0;
  13. }
  14.  
  15. void copy_arr(double artrg1[], double arsrc[], int num) {
  16.   for (int i = 0; i < num; i++) {
  17.     artrg1[i] = arsrc[i];
  18.     printf("i = %d\n", i);
  19.   }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement