fork(2) download
  1. #include <stdio.h>
  2.  
  3. void afunction(int**x){
  4. *x = malloc(2 * sizeof(int));
  5. **x = 12;
  6. *(*x + 1) = 13;
  7. }
  8.  
  9. int main(){
  10. int *v = 10;
  11. afunction(&v);
  12.  
  13. printf("%d %d\n", v[0], v[1]);
  14. return 1;
  15. }
  16.  
Runtime error #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
12 13