fork download
  1. #include <stdio.h>
  2.  
  3. void foo(int i[])
  4. {
  5. i[0] = 0; i[1] = 1; i[2] = 2;
  6. }
  7.  
  8. int main(void) {
  9. int i[] = {6,7,8};
  10. printf("Vorher: %d %d %d\n", i[0], i[1], i[2]);
  11. foo(i);
  12. printf("Nachher: %d %d %d\n", i[0], i[1], i[2]);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
Vorher: 6 7 8
Nachher: 0 1 2