fork download
  1. #include<stdio.h>
  2. struct Data{
  3. int a[5];
  4. };
  5. void array(struct Data data);
  6.  
  7. int main(void){
  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. data.a[1]+=1;
  17. }
  18.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
01234