![](https://static.youtibao.com/asksite/comm/h5/images/m_q_title.png)
有以下程序#include<stdio.h>#include<string.h>main(){char x[]=“STRING”;x[0]=0;
有以下程序
#include<stdio.h>
#include<string.h>
main()
{char x[]=“STRING”;
x[0]=0;x[1]=’\0’;x[2]=’0’;
printf(”%d%d\n”,sizeof(x),strlen(x));
}
程序运行后的输出结果是()。
A.6 1
B.7 0
C.6 3
D.7 1
![](https://static.youtibao.com/asksite/comm/h5/images/solist_ts.png)
有以下程序
#include<stdio.h>
#include<string.h>
main()
{char x[]=“STRING”;
x[0]=0;x[1]=’\0’;x[2]=’0’;
printf(”%d%d\n”,sizeof(x),strlen(x));
}
程序运行后的输出结果是()。
A.6 1
B.7 0
C.6 3
D.7 1
A.=0
B.=1
C.=2
D.=3
A.6
B.8
C.12
D.10
有以下程序: #include<stdio.h> void fun(char *a,char*B){while(*a=='*')a++; while(*b=*A){b++;a++;} } main() {char*s="****a*b****",t[80]; fun(s,t);puts(t); } 程序的运行结果是()。
A.*****a*b
B.a*b
C.a*b****
D.ab
(21 )有以下程序
# include (stdio.h >
main ()
{ int a = l ; b = 2 ;
for (; a < 8 ; a++ ) { b+=a ; a+=2 ; }
printf (" %d , %d \ n ", a , b ) ;
}
程序运行后的输出结果是
A ) 9 , 18
B ) 8 , 11
C ) 7 , 11
D ) 10 , 14
有以下程序
#include<stdio.h>
void fun(int *s)
{ static int j=0;
do { s[j]=s[j]+s[j+1]; )while(j<2);
}
main()
{ int k,a[10]={1,2,3,4,5);
for(k=1;k<3;k++)fun(a);
for(k=0;k<5;k++)printf(”%d”,a[k]);
printf("\n");
}
程序运行后的输出结果是
A) 12345
B)23445
C)34756
D) 35745
有以下程序
#include<stdio.h>
main()
{int s;
scanf(“%d”,&s);
while(s>0)
{switch(s)
{case 1;printf(“%d”,s+5);
case 2:printf(“%d”,s+4);break;
case 3:printf(“%d”。s+3);
default:printf(“%d”,s+1);break;
}
seanf(“%d”,&s);
}
}
运行时,若输入1 2 3 4 5 O<回车>,则输出结果是
A.6566456
B.66656
C.66666
D.6666656
A.数1~10的累加和
B.数1~9的累加和
C.数1~9中的奇数之和
D.数1~10中的偶数之和
A.66877
B.668966
C.6677877
D.6688766
以下程序#include "stdio、h"main(){ char *p="ABCDEF",*q;q=p+3;printf("%s/n",q);}的输出结果是()。