Add files via upload

This commit is contained in:
Christian Bender 2018-01-26 19:38:12 +01:00 committed by GitHub
parent 5ca234369d
commit 730ebb9053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,12 @@
#include "hello_world.h"
#include <stdlib.h>
#include <string.h>
const char *hello(void)
{
char * ans = malloc(sizeof(char) * strlen("Hello, World!"));
strcpy(ans,"Hello, World!");
/* string is pointer of the first character */
return "Hello, World!";
return ans;
}