实际操作与例题操作存在差异~~求指点~~
#include<stdio.h>#define SIZE 20
int main()
{
int value_count=0;
float fp1=0.0;
int i=0;
int j=0;
char word1[SIZE]=" ";
char word2[SIZE]=" ";
int byte_count=0;
value_count=scanf("%f %d %d %[abcdefghijklmnopqrstuvwxyz] %*1d %s%n ",
&fp1,&i,&j,word1,word2,&byte_count);
printf("\nCount of bytes read = %d\n",byte_count);
printf("\nCount of values read = %d\n",value_count);
printf("\nfp1=%f i=%d j=%d",fp1,i,j);
printf("\nword1=%s word2=%s\n",word1,word2);
return 0;
}
程序代码运行后所输入的变量比实例要求多一个~~而显示的value read仍为5个~~求指点