fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int b1[5] = {1,2,3,4,5};
  8. int b2[5] = {6,7,8,9,10};
  9.  
  10. int *a[2] = {b1, b2};
  11.  
  12. for (size_t q=0; q<2; ++q)
  13. {
  14. for (size_t w=0; w<5; ++w)
  15. cout << a[q][w] << ' ';
  16.  
  17. cout << endl;
  18. }
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
1 2 3 4 5 
6 7 8 9 10