fork(2) download
  1. #include <cstdio>
  2. #include <memory.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. const unsigned N = 8;
  9.  
  10. double a[N] = { 1, 2, 3 };
  11. double b[N];
  12.  
  13. memcpy(b, a, sizeof a);
  14.  
  15. for (unsigned q=0; q<N; ++q)
  16. printf("%lf ", b[q]);
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
1.000000 2.000000 3.000000 0.000000 0.000000 0.000000 0.000000 0.000000