有以下程序:
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
[单选题]有以下程序#include<stdio.h>#include<string.h>struet A{int a;char b[10];double c;};struct A f(struct A t);main( ){struct A a={1001,“ZhangDa”,1098.0);a=f(A);prinff(“%d,%S,%6.1f\n”,a.a,a.b,a.e);}struct A f(struct A t){t.a=1002;strepy(t.b,“changRo
[单选题]有以下程序#include<stdio.h>#include<string.h>main( ){char a[10]=”abcd”;prinff(“%d,%d\n”,strlen(A),sizeof(A));}程序运行后的输出结果是A.7,4B.4,10C.8,8D.10,lO
[单选题]有以下程序#include<stdio.h>#include<string.h>main( ){char str[][20]={“Qne*World”,“one*Dream!”},*P=str[1 ].prinff(“%d,”,strlen(p));printf(“%s\n”,P); ’}程序运行后的输出结果是A.9,One*World S)9,One*Dream!B.10,One*Dream!C.10,One*World
[单选题]有以下程序#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 1B.7 0C.6 3D.7 1
[单选题]有以下程序#include<stdio.h>#include<string.h>void fun(char *w,int m){ char s,*p1,*p2;p1=w;p2=w+m-1;while(p1<p2){s=*p1;*p1=*p2;*p2=s;p1++;p2--;}}main(){ char a[]="123456";fun(a,strlen(a));puts(a);}程序运行后的输出结果是A.654321B.116611C.161616D.12345
[单选题]有以下程序#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 1B.7 0C.6 3D.7 1
[单选题]有以下程序#include<stdio.h>#include<string.h>struet A{int a;char b[10];double c;};struct A f(struct A t);main( ){struct A a={1001,“ZhangDa”,1098.0);a=f(A);prinff(“%d,%S,%6.1f\n”,a.a,a.b,a.e);}struct A f(struct A t){t.a=1002;strepy(t.b,“changRo
[单选题]有以下程序#include<stdio.h>#include<string.h>main( ){char str[][20]={“Qne*World”,“one*Dream!”},*P=str[1 ].prinff(“%d,”,strlen(p));printf(“%s\n”,P); ’}程序运行后的输出结果是A.9,One*World S)B.9,One*Dream!C.10,One*Dream!D.10,One*World
[单选题]有以下程序#include<stdio.h>#include<string.h>main( ){char a[10]=”abcd”;prinff(“%d,%d\n”,strlen(A),sizeof(A));}程序运行后的输出结果是A.7,4B.4,10C.8,8D.10,lO
[单选题]有以下程序:include<stdio.h>include<string.h>main( ){ char a[5][10]={"china","beijing","you","tiananmen","welcome");int i,j;char t[10];for(i=0;i<4;i++)for(j=i+1;j<5;j++)if(strcmp(a[i],a[j]