填空题
#include<stdio.h> #include<conio.h> main() { int i,j; char ch; while(ch=getchar()!=’\r’) { i++: printf("%c",ch); } printf("you type%d characters\n",i); } 错误:______ 改正:______
【参考答案】
错误:while(eh=getehar()!m=’\r’)
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
以下程序的功能是对10个整数从小到大排序。请填空。 #include<stdio.h> sort(int arr[],int n); main() {int a[10],*p,i; printf( input 10 numbers: ); for(i=0;i<10;i++) scanf( %d ,&a[i]); printf( nthe original array is: ); for(p=a;P<a+10;p++) printf( %d ,*p); sort(a,10); printf( nthe present array is: ); for(P=a;P<a+10;P++) printf( %d ,*p); } sort(int arr[],int n) {int*p1,*p2,temp; for(p1=arr;p1<arr+(n-1);p1++) for(p2=p1+1;p2<arr+n;p2++) if(______) {temp=*p1;*p1=*p2;*p2=temp;} }
点击查看答案
填空题
以下程序的功能是计算字符串的长度。请填空。 #include<stdio.h> main() {char str[100],*sp=str; int nlen=0; scanf( %s ,str); for(;*sp!=’ 0’;sp++)______; printf( %d ,nlen); }
点击查看答案&解析
相关试题
⑧修改通道地址
⑦发生中断
⑥启动0809进行转换
⑤没有
④809通道0的