#include<stdio.h>
void main()
{char str1[20],str2[20];
gets(str1);
scanf("%s",str2);
printf("str1:%s\n",str1);
printf("str2:%s\n",str2);
}
编程题:函数gets()与scanf()的区别。,布布扣,bubuko.com
时间: 2024-08-21 14:53:28
#include<stdio.h>
void main()
{char str1[20],str2[20];
gets(str1);
scanf("%s",str2);
printf("str1:%s\n",str1);
printf("str2:%s\n",str2);
}
编程题:函数gets()与scanf()的区别。,布布扣,bubuko.com