首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

scanf 函数有关问题

2012-12-16 
scanf 函数问题int i,jchar s[20]scanf(%d%s%d,&i,s,&j) 如果输入 12abc34 56def78那么 i s j的值分

scanf 函数问题

int i,j;                 
char s[20];              
scanf("%d%s%d",&i,s,&j); 

如果输入 12abc34 56def78              那么 i s j的值分别是多少?为什么
[最优解释]
i=12, s = "abc34", j=56
[其他解释]
引用:
i=12, s = "abc34", j=56

刚测试了下.确实如此.刚开始的时候写错了一行代码,没找出错误来,刚才有点顿悟的感觉

热点排行