fork download
  1. #include<stdio.h>
  2.  
  3. struct Data{
  4. int a[5];
  5. };
  6. void array( struct Data data );
  7. int main(void)
  8. {
  9. struct Data data = { 0, 1, 2, 3, 4 };
  10. array( data );
  11. for(int i=0; i<5; i++){
  12. printf("%d ", data.a[i]);
  13. }
  14. return 0;
  15. }
  16. void array( struct Data data )
  17. {
  18. data.a[1] = 5;
  19. }
  20.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
0 1 2 3 4