fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void changeArray(int (*a)[5]);
  5.  
  6. int main(void) {
  7.  
  8. int x[5] = { 1,5,4,3,1 };
  9.  
  10. changeArray(&x);
  11. for (int z = 0; z <= 4; ++z) {
  12. printf("%d", x[z]);
  13. }
  14. }
  15.  
  16. void changeArray(int (*a)[5]) {
  17.  
  18. for (int z = 0; z < 5; ++z) {
  19. (*a)[z] = 1;
  20. }
  21.  
  22. }
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
11111