fork download
  1. #include <stdio.h>
  2.  
  3. f(int *l){for(--l[-1]?f(l):0;*l;l++)*l=l[1]-*l;*--l=0;}
  4.  
  5. int main (int argc, char **argv)
  6. {
  7. int list[] = {4, 10, 18, -12, 4, 8, -3, -5, 67, 9, 14, 0};
  8. int *elem;
  9.  
  10. f(list + 1);
  11.  
  12. for (elem = list + 1; *elem; elem++) {
  13. printf("%d, ", *elem);
  14. }
  15. }
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
-142, 55, 27, 41, -269, 397,