题目内容

运行下面程序,输入“ABCDE”,输出( );输入“0123456789”,输出( )。#include int count(char t[]){ int n=0;while(t[n]) n++;return n;}void main(){ char s[100];gets(s);printf("%d\n", count(s));}

查看答案
更多问题

程序的输出结果是( )和( )。#include int n=30;void main(){ int n=20;{ int n=10;printf("%d", n); }printf("%4d\n", n);}

程序输出结果是( )和( )。#include int fun(int a, int b){ return (a>b ? a+b : a-b); }void main(){ int x=5, y=8;printf("%d",fun(x,y));printf("%5d\n",fun(fun(x,y), 10));}

程序输出结果是( )和( )。#include int fun(int x){ static int y;y=y+10;return x+y;}void main(){printf("%d", fun(10));printf("%4d\n", fun(10));}

(填写适当内容,完善程序功能)下面程序的功能是:求阶乘之和s=1!+2!+3!+4!+5!+6!+7!+8!+9!+10!。#include int fact(int m){int i, t=1;for(i=1; i<=m; i++) _______;return t;}int sum(int n ){int i, _______;for(i=1; i<=n; i++)s=s+fact(i);return s;}void main( ){ int n=10;printf("%d\n", sum(n) );}

答案查题题库