网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下面代码的输出结果是______。 L = [1,2,3,4,5] s1 = ','.join(str(n) for n in L) print(s1)

A.[1,2,3,4,5]

B.1,,2,,3,,4,,5

C.[1,,2,,3,,4,,5]

D.1,2,3,4,5


参考答案和解析
D
更多 “下面代码的输出结果是______。 L = [1,2,3,4,5] s1 = ','.join(str(n) for n in L) print(s1)A.[1,2,3,4,5]B.1,,2,,3,,4,,5C.[1,,2,,3,,4,,5]D.1,2,3,4,5” 相关考题
考题 以下程序的输出结果是 【 18 】 。# include stdlib.hmain( ){ char *s1,*s2,m;s1=s2=(char*)malloc(sizeof(char));*s1=15; *s2=20; m=*s1+*s2;printf("%d\n",m);}

考题 以下程序的输出结果是______# includemain(){char *s1,*s2,m;s1=s2=(char*)malloc(sizeof(char));*s1=15;*s2=20;m=*s1+*s2;printf(“%d\n”,m);}

考题 下面程序的输出结果是( )。#include "string.h"fun(char*w,int n){ char t,*s1,*s2;s1=w; s2=w+n-1;while(s1s2){ t=*s1++;*s1=*s2--;*s2=t;}}main(){ static char p[]="1234567";fun(p,strlen(p));printf("%s",p);}A.7654321 B.1717171 C.7171717 D.1711717

考题 下面程序的输出结果是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

考题 下列过程说明合法的是( ) A、Sub S1(ByVal n!())B、Sub S1(n!) as IntegerC、 Function S1%(S1%)D、 Function S1(ByVal n!)

考题 若有以下定义和语句: char*s1="12345",*s2="1234"; printf("%d\n",strlen(strcpy(s1,s2)));则输出结果是______。A.4B.5C.9D.10

考题 有以下程序并includeincludefun(char * w,int n){char t,*s1,*s2; s1=w;s2= 有以下程序 并include<stdio.h> #include<string.h> fun(char * w,int n) { char t,*s1,*s2; s1=w; s2=w+n-1; while(s1<s2) { t=*s1++; * s1=*s2--; * s2=t; } } main() { char p[]="1234567"; fun(p,strlen(p)); puts(p); } 程序运行后的输出结果是( )A.1234567B.7654321C.1711717D.7177171

考题 对于下面的程序includeincludechar *scmp(char*s1,char*s2){if(strcmp(s1, 对于下面的程序 #include<stdio.h> #include<string.h> char *scmp(char*s1,char*s2) { if(strcmp(s1,s2)<0)return(s1); else return(s2); } main() { int i:char string[20],sb[3][20]; for(i=0;i<3;i++)gets(str[i]); strcpy(string,scmp(str[0],str[1])); strcpy(string,scmp(string,str[21)); printf("%s\n",string); } 若运行时依次输入abcd、abba和abc三个字符串,则输出结果为______。A.abcdB.abbaC.abcD.abca

考题 有以下程序:include using namespace std;class sample{private: int n;public: samp 有以下程序: #include <iostream> using namespace std; class sample { private: int n; public: sample(){} sample (int m) { n=m; } sample add(sample s1,sample s2) { this->n=s1.n+s2.n; return (*this); } void disp() { cout<<"n="<<n<<end1; } }; int main () { sample s1(10) ,s2(5),s3; s3.add(s1,s2); s3.disp(); return 0; } 程序运行后,输出的结果是( )。A.n=10B.n=5C.n=20D.n=15

考题 以下程序的输出结果是______。includeincludefun(char*w,int n){ char t,*s 以下程序的输出结果是______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) { t=*s1++; *s1=*s2-; *s2=t; } } main() { char*p; p="1234567"; fun(p,strlen(p)); puts(p); }A.1234567B.7654321C.1711717D.7177171

考题 对于下面的程序includeincludechar * scmp(char * s1,char * s2){if(strcm 对于下面的程序 #include<stdio.h> #include<string.h> char * scmp(char * s1,char * s2) { if(strcmp(s1,s2)<0)return(s1); else return(s2); } main() { int i;char string[20],str[3][20]; for(i=0;i<3;i++)gets(str[i]); strcpy(string,scmp(str[0],str[1])); strcpy(string,scmp(string,str[2])); printf("%s\n",string); } 若运行时依次输入abcd、abba和abc三个字符串,则输出结果为 ______。A.abcdB.abbaC.abcD.abca

考题 以下程序运行后输入:3,abcde回车,则输出结果是【 】include move(char *str, 以下程序运行后输入:3,abcde回车,则输出结果是【 】include <string.h>move(char *str, int n){ char temp; int i;temp=str[n-1];for(i=n-1;i>0;i--) str[i]=str[i-1];str[0]=temp;}main( ){ char s[50]; int n, i, z;scanf("%d,%s",n,s);z=strlen(s);for(i=1; i<=n; i++) move(s, z);printf("%s\n",s);}

考题 执行以下程序段,并输入1.23,则程序的输出结果应是【 】。N=Str(InputBox(“请输入一个实数:”))p=IiaStr(N,".")Print Mid(N,p)

考题 请读程序段: char str[]="ABCD",*p=str print("%d\n",*(p+4)); 程序段的输出结果是______。A.68B.OC.字符'D'的地址D.不确定的值

考题 下列程序运行后,输出结果是______。 include include fun(char *w ,int 下列程序运行后,输出结果是______。 #include <stdio. h> #include <string. h> fun (char *w ,int n) { char t,*s1,*s2; s1=w; s2=w+n-1; while (s1<s2) { t=*s1++; *s1=*s2--; *s2=t; } } main () { char *p; p="1234567"; fun (p, strlen (p)); puts (p); }A.1234567B.7654321C.1711717D.7177171

考题 以下程序的输出结果是( )。 char str[15]=”hello!”; printf(“%d\n”,strlen(str)); A.15 以下程序的输出结果是( )。 char str[15]=”hello!”; printf(“%d\n”,strlen(str));A.15B.14C.7D.6

考题 以下程序的输出结果是_______。includeincludefun(char*w,int n){char t,*s 以下程序的输出结果是_______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) { t=*s1++: *sl=*s2-; *s2=t; } } main() { char*p; p="1234567"; fun(p,strlen(p)); puts(p); }A.1234567B.7654321C.1711717D.7177171

考题 下面程序的输出结果是 ( ) 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

考题 有以下程序:include using namespace std;class sample{private:intn;public:sample( 有以下程序:#include <iostream>using namespace std;class sample{private: int n;public: sample() {} sample(int m) { n=m; } sample add(sample s1,sample s2) { this->n-s1.n+s2.n; return (*this); void disp() { cout <<"n="<<n<<end1; } };int main (}{ sample s1(10),s2(5),s3; s3.add(s1,s2); s3.disp (); return 0;}程序运行后,输出的结果是A.n=10B.n=5C.n=20D.n=15

考题 下面程序的输出结果是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

考题 下面程序段的输出结果是( )。 char str[]="ABC",*p=str; Printf("%d\n",*(p+3));A.67B.0C.字符'C'的地址D.字符'C'

考题 下面程序的运行结果是______。 include include fun(char*w,int n) { char 下面程序的运行结果是______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) {t=*s1++;*s1=*s2--;*s2=t;} } main() { char*p; p="1234567"; fun(p,strlen(p)); puts(p); }A.7654321B.1714171C.1711717D.7177171

考题 以下程序的输出结果是( )。 include main() {char*s1,*s2,m; s1=s2=(char*)malloc(size 以下程序的输出结果是( )。include<stdlib.h>main(){char*s1,*s2,m;s1=s2=(char*)malloc(sizeof(char));*s1=15;*s2=20;m=*s1+*s2:printf("%d\n",m);}

考题 ( 31 )若有以下定义和语句char s1[10]= " abcd! " ,*s2= " \n123\\ ";printf ( " %d %d\n ", strlen ( s1 ) ,strlen ( s2 ) ) ;则输出结果是A ) 5 5B ) 10 5C ) 10 7D ) 5 8

考题 在Python3中,对于一个列表l=["Hello","World"],以下哪些语句可以正常输出"HelloWorld"。()A、print("".join(l))B、print(l.join(""))C、print(*l,sep="")D、print(l)

考题 分析下面的Javascript代码段,输出结果是() var s1=parseInt(“101中学”); document.write(s1);A、NaNB、101中学C、101D、出现脚本错误

考题 已知for(;n=1;n--),下列语句实现将S2所指字符数组中前n个字符复制到S1所指字符数组中,其中代码不正确的是()。A、*S1++=*S2++B、S1[n-1]=S2[n-1]C、*(S1+n-1)=*(S2+n-1)D、*(++S1)=*(++S2)

考题 单选题若有以下定义和语句:char s1[10]=abcd!, *s2=n123\\;printf(%d%d, strlen(s1), strlen(s2));则输出结果是(  )。A 55B 105C 107D 58