fork(2) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. int * val = malloc(sizeof(int));
  6. *val = 0;
  7. *val += 1;
  8. printf("%d\n", *val);
  9. (*val)++;
  10. printf("%d\n", *val);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
1
2