fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.  
  5. int a[10];
  6. int b[10];
  7. int c[20];
  8. int i;
  9.  
  10. srand(time(NULL));
  11.  
  12. for(i = 0; i < 10; i++){
  13. a[i] = rand()%101;
  14. }
  15. for(i = 0; i < 10; i++){
  16. b[i] = rand()%101;
  17. }
  18.  
  19. memcpy(c, a, 10 * sizeof (int));
  20. memcpy(c + 10, b, 10 * sizeof (int));
  21.  
  22. for(i = 0; i < 20; i++){
  23. printf("%d\n", c[i]);
  24. }
  25.  
  26. }
Success #stdin #stdout 0s 4312KB
stdin
Standard input is empty
stdout
64
36
71
51
19
73
79
3
81
76
65
10
35
29
15
95
36
92
82
26