fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main()
  4. {
  5. // a is a 20x20 2D array of chars
  6. char (*a)[20]=calloc(20, sizeof(char[20]));
  7. strcpy(a[0], "abcd");
  8. strcpy(a[1], "wxyz");
  9. printf("%s\n",a[0]);
  10. printf("%s\n",a[1]);
  11. return 0;
  12. }
Success #stdin #stdout 0s 1964KB
stdin
Standard input is empty
stdout
abcd
wxyz