题目
A.10
B.11
C.51
D.60
第1题
以下程序的输出结果是【 】。
include<iostream.h>
include <string.h>
void main 0 {
char s[50];
strcpy(&s[O], "No" );
strcpy(&s[1], "123" );
strcpy (&s[2], "23456" );
cout<<s;
}
第2题
以下程序的输出结果是#include <stdio.h>main(){ int k=4,s=0; do{ if((k%3)==0) continue; s+=k;k++; }while(k>10); printf("s=%d\n",s);}
第3题
以下程序运行后的输出结果是【 】。
include<iostream.h>
void main(){
char s[]=“123456”,*p;
for(p=s; p<s+2; p++)
cout<<p<<end1;
}
第4题
(9)以下程序运行后的输出结果是【9】
#include <stdio.h>
main()
{int k=1,s=0;
do{
if{((k&2)!=0)continue;
s+=k;k++;
}while(k)10);
printf(“s=&d/n”,s);
}
第5题
以下程序的输出结果是() #include<stdio.h> #include<string.h> main() {char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str)); }
A.6
B.7
C.11
D.12
第6题
以下程序的输出结果是【 】。
include <iostream>
using namespace std;
int main()
{
char S[ ]="abcdef";
s[3]='\0';
cout<<s<<end1;
return 0;
}
第7题
设已执行预编译命令#include<string.h>,以下程序段的输出结果是()。 char s[]=" an apple" ; printf(" %d\n" ,strlen(s));
A.7
B.8
C.9
D.10
第8题
以下程序的输出结果是()。 #include <stdio.h> #include <string.h> main() { char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str) ); }
A.6
B.7
C.11
D.12
第9题
以下程序的输出结果是【 】。
include <iostream>
using namespace std;
int main()
{
int s,i;
for(s=0,i=1;i<3;i++)
s+=i;
cout<<s<<end1;
return 0;
}
第10题
以下程序的输出结果是【 】。
include <stdio.h>
main ()
int a[3][3] ={{1,2,9},{3,4,8},{5,6,7} } ,i,s=0;
for(i=0;i<3;i++) s+ =a[i][i] + a[i][3-i-1];
pfintf("% d \n" ,s);
第11题
以下程序的输出结果是#include <stdio.h>int fun(int x){ static int m=0; return(m *=x);}main(){ int s,i; for(i=l;i<=3;i++) s=fun(i); printf("%d\n",s);}
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!