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.  
  8. int size = sizeof(b)/sizeof(b[0]);
  9.  
  10. display( b, size );
  11.  
  12. return 0;
  13. }
  14.  
  15. void display( const int a[], int n)
  16. {
  17. for(int i = 0; i < n; i++){
  18. printf("%d ", a[i]);
  19. }
  20. printf("\n");
  21. }
Success #stdin #stdout 0s 5544KB
stdin
Standard input is empty
stdout
1 2 3 4 5