关于C语言的一道题目程序是这样的?main(){char *t="23142";int a=0,b=0,c=0,d=0,k;for(k=0;t[k];k++)switch(t[k]){default:d++;case'1':a++;case'2':b++;case'3':c++;}printf("%d,%d.%d,%d\n",a,b,c,d);}请问最后输出什么?还有为什么?怎
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/25 08:53:06
![关于C语言的一道题目程序是这样的?main(){char *t=](/uploads/image/z/10137448-64-8.jpg?t=%E5%85%B3%E4%BA%8EC%E8%AF%AD%E8%A8%80%E7%9A%84%E4%B8%80%E9%81%93%E9%A2%98%E7%9B%AE%E7%A8%8B%E5%BA%8F%E6%98%AF%E8%BF%99%E6%A0%B7%E7%9A%84%3Fmain%28%29%7Bchar+%2At%3D%2223142%22%3Bint+a%3D0%2Cb%3D0%2Cc%3D0%2Cd%3D0%2Ck%3Bfor%28k%3D0%3Bt%5Bk%5D%3Bk%2B%2B%29switch%28t%5Bk%5D%29%7Bdefault%3Ad%2B%2B%3Bcase%271%27%3Aa%2B%2B%3Bcase%272%27%3Ab%2B%2B%3Bcase%273%27%3Ac%2B%2B%3B%7Dprintf%28%22%25d%2C%25d.%25d%2C%25d%5Cn%22%2Ca%2Cb%2Cc%2Cd%29%3B%7D%E8%AF%B7%E9%97%AE%E6%9C%80%E5%90%8E%E8%BE%93%E5%87%BA%E4%BB%80%E4%B9%88%3F%E8%BF%98%E6%9C%89%E4%B8%BA%E4%BB%80%E4%B9%88%3F%E6%80%8E)
xNI_BM\16{aN
""` 6C08c&x鞙=CesRLfz&^mJ=֜l65ov;rrex[)Uqw/|2ywKt(oޑ?';{wGߴ{_o{>L
vD֞Yk g&&H[˓!d(,oa6P{[6"ý]qˮivU6D>aЌɎ/'