题目内容

下面程序的功能是:将字符数组a中下标值为偶数的元素从小到大排列,其它元素不变。请填空。(2000年4月)#include #include void main(){ char a[]="clanguage",t; int i, j, k; k=strlen(a); for(i=0; i<=k-2; i+=2) for(j=i+2; j<=k;) if() { t=a[i]; a[i]=a[j]; a[j]=t; } puts(a); printf("\n"); }

查看答案
更多问题

下列程序段的输出结果是_________。(2001年4月)main(){ char b[]=”Hello,you”; b[5]=0; printf(“%s \n”, b );}

以下程序的输出结果是_________。(2002年4月)main(){ char s[]="abcdef"; s[3]=‘\0'; printf("%s\n",s);}

下面invert函数的功能是将一个字符串str的内容颠倒过来。请填空。(1996年9月)#include void invert(char str[]){ int i,j,;for(i=0,j=strlen(str); i

字符串"ab\n\\012/\\\""的长度为___

答案查题题库