Ad
Code
Diff
  • #include <string.h>
    #include <stdlib.h>
    
    char *Hi(void) {
        char *ans = calloc(13, sizeof(char));
        strcpy(ans, "Hello World.");
        return ans;
    }
    • #include <string.h>
    • #include <stdlib.h>
    • char *Hi(void) {
    • char *ans = (char*) malloc(13 * sizeof(char));
    • char *ans = calloc(13, sizeof(char));
    • strcpy(ans, "Hello World.");
    • return ans;
    • }