填空题
下面程序的功能是将一个字符串str的内容倒序,请填空。 #inelude <stdio.h> #include <strins.h> main() int i,j,
; charstr[]="1234567"; for(i=0,j=strlen(str)
;i<j; i++,j--) k=str[i];str[i]=str[j];str[j]=k; printf("%s\\n",str);
【参考答案】
k -1
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
下列程序运行后的输出结果是______。 #include<stdio.h> main() char s[20]; scanf( %s ,s); printf( %s ,s); 运行程序,输入HOW ARE YOU。
点击查看答案&解析
填空题
函数void fun(float *sn,int n)的功能是:根据以下公式计算s,计算结果通过形参指针 sn传回;n通过形参传入,n的值大于或等于0。请填空。 void fun(float *sn,int n) float s=0.0,w,f=-1.0; int i; for(i=0;i<=n;i++) f= * f; w=f (2*i+1); s+=w; =s;
点击查看答案&解析
相关试题
下列程序的功能是:将输入的正整数按逆序输...