fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. typedef char arr1k_char[1000];
  5.  
  6. arr1k_char *foo(int n) {
  7. arr1k_char *x = malloc(n * sizeof *x);
  8. return x;
  9. }
  10.  
  11. int main(void) {
  12. arr1k_char *bar = foo(2);
  13. bar[0][0] = '\n'; bar[0][1] = 0;
  14. strcpy(bar[1], "hello world");
  15. free(bar);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
Standard output is empty