69,373
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#define MAXLINE 1000
int main()
{
char* test(char *line);
char line[MAXLINE];
int i;
printf("Please input:\n");
printf("%s",test(line));
return 0;
}
char* test(char *line)
{
char *beg=line;
while(*line != EOF && *line != '\n')
scanf("%c",line++);
return beg;
}
#include <stdio.h>
#define MAXLINE 1000
int main()
{
char line[MAXLINE];
int i;
printf("Please input:\n");
printf("%s",test(line));
return 0;
}
char* test(char *line)
{
char *beg=line;
while(*line != EOF && *line != '\n')
scanf("%c",line++);
return beg;
}