fork download
  1. #include <iostream>
  2.  
  3. void print (const int *arr, const int size) {
  4. for (int i = 0; i < size; ++i)
  5. std::cout << arr [i] << ' ';
  6. }
  7.  
  8. int main() {
  9. const int array[] = {1, 5, 7};
  10. print (array, sizeof array / sizeof array[0]);
  11. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
1 5 7