Tip: don't use gets (fgets is more save).
Tip: input is 10 characters long. that's 9 chars and a null character to terminate the string.
Tip: find a good C Tutorial site with some examples
I'm not going to make your code work because I'm too lazy and you don't learn anything from it. Here's a small example.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void get_line(char *line);
char *get_line2(char *line);
int main( void )
{
char line[1024];
get_line(line);
printf(line);
printf(get_line2(line));
return 0;
}
void get_line(char *line)
{
strcpy(line, "Hello world!\n");
}
char *get_line2(char *line)
{
strcpy(line, "Hello world2!\n");
return line;
}