更多“以下程序运行后的输出结果是【】。 include<iostream> using namespace std; int main() {int i=10,”相关的问题
第1题
以下程序运行后的输出结果是:( ) ls = ["car","truck"] def funC(a): ls =[] ls.append(a) return funC("bus") print(ls)
点击查看答案
第2题
以下程序运行后的输出结果是:( ) lt = [12,35,21,45,9,10] g = lambda x: sum([ i for i in x if i%2==0]) print(g(lt))
点击查看答案
第3题
有以下程序。程序运行后的输出结果是 。 #include <stdio.h> main( ) { int c=0,k; for (k=1;k<3;k++) switch (k) { default: c+=k; case 2: c++;break; 4: c+=2;break; } printf("%d\n",c); }> A、7
点击查看答案
第4题
以下程序运行后输出的结果是( )。 String s = new String("abcdefg"); for(int i = 0; i < s.length(); i += 2){ System.out.print(s.charAt(i)); }
A、aceg
B、ACEG
C、abcdefg
D、abcd
点击查看答案
第5题
以下程序运行后的输出结果是【 】。 include <stdio, h> include <string, h> main() { char ch[] ="abc".,x[3] [4]: int i: for(i=0;i<3:i ++) strcpy(x[i] ,ch): for(i =0;i<3:i++) printf("% s" ,&x[i] [i]); printf(" \n" ) }
点击查看答案
第6题
运行下列程序,输出结果是( ). struct student { int num; struct student *next; }; int main() { struct student a[3]={1,&a[1],2,&a[2],3,&a[0]},*p; p=&a[1]; printf("%d%d\n ",p->num,p->next->num); return 0; }
点击查看答案
第7题
以下程序的运行结果是( )。 #include "stdio.h" main( ) { int a=24,b=16,c; c=abc(a,b); printf("%d",c); } int abc(int u,int v) { int w; while(v) { w=u%v;u=v;v=w; } return u; }
点击查看答案
第8题
以下程序执行后的输出结果是( )。 #include "stdio.h" main( ) { char x='d'; x=(x>='a'&&x<='z')?(x-32):x; printf("%c", x); }> A、D
点击查看答案
第9题
以下程序运行后,输出结果是______。
#include
ss(char*s)
{ char*p=s;
while(*P) ++p;
return(P-s);
}
main()
{ char*a="abded";
int i;
i=ss(a);
printf("%d\n",i);
}
点击查看答案