Documentation
1
2
3
4
5
6
7
8
9
10
11
12
int *f(int x) {
  return malloc(x * sizeof(int));
}

int main() {
  int x = 1; // x has to be greater than 0
  int *z;
  z = f(x);
  if (z != 0) {
    z[0] = 10;
  }
}