首页 > 高职专科
题目内容 (请给出正确答案)
[主观题]

运行以下程序,输出结果为()。s='a1b2c3d4' lst=[] n=len(s) for i in range(0,n,2): ls

运行以下程序,输出结果为()。s='a1b2c3d4' lst=[] n=len(s) for i in range(0,n,2): lst.append(s[i:i+2] ) print(lst[-3])

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“运行以下程序,输出结果为()。s='a1b2c3d4' ls…”相关的问题
第1题
运行以下程序,输出结果为()。lst1=[70,80,93,88,90] lst2=[i for i in lst1 if i>90] print(lst2)

点击查看答案
第2题
运行以下程序,输出结果为()。lst1=[1,2,3,4,5] lst2=[] for i in lst1: lst 2.append(i) print(lst2[-1])

点击查看答案
第3题
以下程序的运行结果为()。 for i in range(2,4): s=0 for j in range(1,i): s=s+j print(s)

点击查看答案
第4题
以下程序运行后的输出结果是【 】。 include <stdio.h> define S(x) 4 * x * x + 1

以下程序运行后的输出结果是【 】。 include <stdio.h> define S(x) 4 * x * x + 1 main() { int i=6,j=8; prinff("% d \ n" , S(i + j) ); }

点击查看答案
第5题
以下程序运行后,输出结果是 () include<stdio.h> define PT5.5 define S (x)PT* x *

以下程序运行后,输出结果是 () include<stdio.h> define PT5.5 define S (x)PT* x * x main() { int a=1,b=2; printf("%4.1f\n",s(a+b)); }

A.49.5

B.9.5

C.22

D.45

点击查看答案
第6题
以下程序运行后,输出结果是______。 define P4.5 define S(x)P*x*x include<stdio.h> main() { in

以下程序运行后,输出结果是______。 define P4.5 define S(x)P*x*x include<stdio.h> main() { int a=2,b=3; printf("%.1f\n",S(a+b)); }

A.49.5

B.112.5

C.18

D.24

点击查看答案
第7题
有以下程序#include<stdio.h>main(){char s[]="159",*P;p=s;printf("%C",*p++);printf("%C",*p++

有以下程序

#include<stdio.h>

main()

{char s[]="159",*P;

p=s;

printf("%C",*p++);

printf("%C",*p++);

}

程序运行后的输出结果是______。

点击查看答案
第8题
以下程序运行后的输出结果是______。 inClude <strinq.h> char *ss(char *s)

以下程序运行后的输出结果是______。 inClude <strinq.h> char *ss(char *s) { char *p;t; p=S+1;t=*s; while(*p){*(p-1)=*p;p++;} *(p-1)=t; return s; } main() { char *p,str[10]="abcdefgh"; p=ss(str); printf("%s\n",p); }

点击查看答案
第9题
以下程序运行后,输出结果是 define PT 5.5 define S(x) PT*x*x include<stdio.h>

以下程序运行后,输出结果是 define PT 5.5 define S(x) PT*x*x include<stdio.h> main() { int a=1,b=2; printf("%4.1f\n",S(a+b));}

A.49.5

B.9.5

C.22

D.45

点击查看答案
第10题
若输入I have a test.,则以下程序的运行结果为【 】。 include<stdio.h> main() { FILE*fp;

若输入I have a test.,则以下程序的运行结果为【 】。 include<stdio.h> main() { FILE*fp; char str[100],filename[10]; int i=0; if ((fp=fopen("test","w"))==NULL) { printf("can not open the file!\n"); exit(0); } getchar(); gets(str); while(str[i]!=) { if (str[i]>=a && str[i]<=z) str[i]=str[i]-32; fputc(str[i],fp); i++; } fclose(fp); fp=fopen("test","r"); fgets(str,strlen(str)+1,fp); printf("%s\n",str); fclose(fp); }

点击查看答案
第11题
若输入this test terminal,以下程序的输出结果为:terminal test this。请填空。 define MAXLI
NE 20 【 】 { int i; char * pstr[3],str[3][MAXLINE]; for(i=0;i<3;+ +)pstr[i]=str[i]; for(i=0;i<3;i + +)scanf("%s",pstr[1]); sort(pstr); for(i=0;i<3;i+ +)prntf("%s",pstr[i]); } sort(【 】 ) char * pstr[3]; {int i,j; char * p; for(i=0;i<3;i+ +) for(j=i + 1;j<3;j + +) if(strcmp(* (pstr+i,* (pstr+j)>0 {p=* (pstr + i); * (pstr + i=【 】 ; * (pstr +j)=p; }

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改