1.A %3d是123,%f是45,a截断了输入
2.A
3. 17,21,11\n
4. 3.140000,3.142\n
5. # include <stdio.h>
int main()
{
char ch;
ch=getchar();
ch+=(97-65);
printf("%c",ch);
return 0;
}
6.源代码中第二个scanf输入被跳过了
include <stdio.h>
main()
{
int a;
char b;
float c;
printf(“Please input an integer:”);
scanf(“%d”,&a);
printf(“integer:%d\n”,a);
getchar();
printf(“Please input a character:”);
scanf(“%c”,&b);
printf(“character:%c\n”,b);
printf(“Please input a float number:”);
scanf(“%f”,&c);
printf(“float:%f\n”,c);
return 0;
}