fork download
  1. #include <stdio.h>
  2.  
  3. void display( const int a[], int n );
  4.  
  5. int main(void) {
  6. int b[5] = {1,2,3,4,5};
  7. int size = sizeof(b) / sizeof(b[0]);
  8. display( b, size );
  9.  
  10. return 0;
  11. }
  12. void display(const int a[], int n ){
  13. for(int i = 0; i < n; i++){
  14. printf("%d ", a[i] );
  15. }
  16. printf("\n");
  17. }
  18.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
1 2 3 4 5