有如下定义:charstr[3][2]={’a’,’b’,’c’,’/0’,’e’,’f’};则语句:printf("%s",str[0]);的输出结果是()A、abB、abcefC、abc/0D、abc
有如下定义:charstr[3][2]={’a’,’b’,’c’,’/0’,’e’,’f’};则语句:printf("%s",str[0]);的输出结果是()
- A、ab
- B、abcef
- C、abc/0
- D、abc
相关考题:
下面程序的输出结果是includeincludemain(){char *pl="abc",*p2="ABC",str 下面程序的输出结果是 #include<stdio.h> #include<string.h> main() { char *pl="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2,strcat(p1,p2)); printf("%s\n",str);}A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC
下列程序的运行结果为includevoid abc(char*str){int a,b;for(a=b=0;str[a]!='\0';a++ 下列程序的运行结果为 #include<stdio.h> void abc(char*str) { int a,b; for(a=b=0;str[a]!='\0';a++) if(str[a]!='c') str[b++]=str[a]; str[b]='\0';} void main() { char str[]="abcdef"; abc(str); printf("str[])=%s",str);}A.str[]=abdefB.str[]=abcdefC.str[]=aD.str[]=ab
下列程序的运行结果为#includestdio.hvoid abc(char*str){ int a,b;for(a=b=0;str[a]!='\0';a++)if(str[a]!='c')str[b++]=str[a];str[b]='\0';}void main(){ char str[]="abcdef";abc(str);printf("str[]=%s",str); }A.str[]=abdefB.str[]=abcdefC.str[]=aD.str[]=ab
下列程序的输出结果是( ) struct abc { int a,b,c;}; main() { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t); }A.3B.4C.5D.6
下列程序的输出结果是()。includestruct abc{int a, b, c, s;};main(){struct abc s[2] 下列程序的输出结果是( )。 #include <stdio.h> struct abc { int a, b, c, s;}; main() { struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t); }A.5B.6C.7D.8
以下C程序段的输出结果是(30)。 include void abc(char *str){ int a, b; 以下C程序段的输出结果是(30)。 #include <stdio. h> void abc(char *str){ int a, b; for(a=b=0;str[a]!='\O';a++)if(str[a]!='c') str[b++]=str[a]; str[b]='\O'; } void main(){ char str[]="abcdef"; abc(str); printf("str[]=%s",str); }A.str[]=aB.str[]=abC.str[]=abdefD.str[]=abcdef
下列程序段的运行结果是()。includevoid main(){char str[]="ABC",*p=str;printf("%d\n 下列程序段的运行结果是( )。 #include<stdio.h> void main() { char str[]="ABC",*p=str; printf("%d\n",*(p+3)); }A.67B.0C.字符'C'的地址D.字符'C'
下列程序段的运行结果是()。 include void main() {char str[]="ABC",*p=str; printf(" 下列程序段的运行结果是( )。#include<stdio.h>void main(){ char str[]="ABC",*p=str;printf("%d\n",*(p+3) );}A.67B.0C.字符'C'的地址D.字符'C'
有如下程序段struct abc{ int a, b, c, s;};main(){ struct abc s[2]={{1,2,3},{4,5,6}}; int t; t=s[0].a+s[1].b; printf("%d\n",t);}程序运行后输出的结果是A.5 B.6 C.7 D.8
设有如下定义: int x=10,y=3,z; 则语句printf("%d\n",z=(x%y,x/y)); 的输出结果是( )。A.1SX 设有如下定义: int x=10,y=3,z; 则语句printf("%d\n",z=(x%y,x/y)); 的输出结果是( )。A.1B.0C.4D.3
有如下定义:charstr[3][2]={’a’,’b’,’c’,’\0’,’e’,’f’};则语句:printf("%s",str[0]);的输出结果是() A.abB.abcefC.abc\0D.abc
下面程序的输出结果是 ( ) include include { char * p1="abc" , * 下面程序的输出结果是 ( ) # include<stdio.h> # include<string.h> { char * p1="abc" , * p2=" ABC ",str[50]="xyz"; strcpy(str+2.strcat (pi,p2)); printf("%s\n",str);}A.xyzabcABB.zabcABCC.yzabcABCD.xycbcABC
下面程序的输出结果是includeincludemain(){char *p1="abc",*p2="ABC",str 下面程序的输出结果是 #include<stdio.h> #include<string.h> main() { char *p1="abc",*p2="ABC",str[50]="xyz"; strcpy(str+2,strcat(p1,p2)); printf("%s\n",str);}A.xyzabcABCB.zabcABCC.xyabcABCD.yzabcABC
设有定义语句:charstr[][20]={"Hello","Beijing"},*p=str;()则printf("%d/n",strlen(p+20));输出结果是A、0B、5C、7D、20
单选题有如下定义:charstr[3][2]={’a’,’b’,’c’,’/0’,’e’,’f’};则语句:printf("%s",str[0]);的输出结果是()AabBabcefCabc/0Dabc
单选题设有如下定义:intx=10,y=3,z;则语句 printf("%d/n",z=(x%y,x/y));的输出结果是()A1B0C4D3