Initial commit
This commit is contained in:
18
kapitel11/return-flt-fail.c
Normal file
18
kapitel11/return-flt-fail.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
char *say(char namn[]);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("%s\n", say("Jack-Benny"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *say(char namn[])
|
||||
{
|
||||
char str[50] = { 0 };
|
||||
strncat(str, "Hej ", 4);
|
||||
strncat(str, namn, 45);
|
||||
return str;
|
||||
}
|
Reference in New Issue
Block a user