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