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