We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ffd651d + fc6a345 commit 2feeed5Copy full SHA for 2feeed5
exercism/hello-world/hello_world.c
@@ -5,6 +5,7 @@
5
const char *hello(void)
6
{
7
char * ans = malloc(sizeof(char) * strlen("Hello, World!"));
8
+ if (!ans) return NULL;
9
strcpy(ans,"Hello, World!");
10
11
/* string is pointer of the first character */
0 commit comments