I made some code in C with two functions.
One functions looks for a word (group of characters) and then saves it to a string. The other function shows what's inside the string. I can't find the right way to save the returning value to a string.
Here is my code:
#include <stdio.h>
char SchrijfString(void);
void LeesString(char);
int main(void)
{
char x[60];
x = SchrijfString(x);
LeesString(x);
return 0;
}
char SchrijfString(char x[])
{
printf("geef een string in: \n");
gets(x);
return x;
}
void LeesString(char x[])
{
printf("In de string zit:\n %s", x);
getchar();
}