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