mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 05:21:49 +03:00
Add files via upload
This commit is contained in:
parent
5ca234369d
commit
730ebb9053
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user