scanf(" %[^\n]",line);
我的一个朋友建议使用fgets()读取一行作为输入比使用scanf()上面的声明更好.他有道理吗?
fgets()
scanf()
c scanf stdio
c ×1
scanf ×1
stdio ×1