#include <stdio.h>
char *my_gets(char *c)
{
char *p = c;
while((*c = getchar()) != '\n')
{
c++;
}
*c = '\0';
return p;
}
int main()
{
char c[20] = {0};
printf("Please input a string:\n");
char *p=my_gets(c);
printf("The string is:\n%s\n",p);
return 0;
}