1、下面程序的输出结果是()。 def StudentInfo(country='中国',name): print('%s,%s'%(name,country)) StudentInfo('美国','大卫')
A.大卫,美国
B.美国,大卫
C.大卫,中国
D.报错
第1题:
有以下程序 struct STU { char name[10]; int num; float TotalScore; }; vold f(struct STU *p) { struct STU s[2]={{"SunDan",20044,550),{"Penghua".20045,537}},*q=s ++p; ++q; *p=*q; } main() { struct SrU s[3]={{"YangSan",20041,703),{"LiSiGuo",20042,580}}; f(s); printf("%s %d %3.of\n",S[1].name,s[1].num,s[1].Totalscore); } 程序运行后的输出结果是
A.SunDan 20044 550
B.Penghua 20045 537
C.USiGuo 20042 580
D.SunDan 20041 703
第2题:
在窗体上添加一个命令按钮(其Name属性为Command1),然后编写如下代码: Option Base 1 Private Sub Command1_Click() Dim a s = 0 a = Array(4, 3, 2, 1) j = 1 For i = 4 To 1 Step -1 s = s + a(i)* j j = j * 10 Next i Print s End Sub 运行上面的程序、单击命令按钮,其输出结果是
A.4321
B.1234
C.34
D.12
第3题:
有如下程序: #include<iostream> using namespace std; class Name{ char name[20]; public: Name( ){strepy(name," ");tout<<'?';} Name(char*fname){strcpy(name,fname);cout<<'?';} }; int main( ){ Name name[3]={Name("张三"),Name("李四")}; return 0; } 运行此程序输出符号“?”的个数是
A.0
B.1
C.2
D.3
第4题:
请使用VC6或使用【答题】菜单打开考生文件夹projl下的工程projl。程序中位于每个“//ERROR****found料****之后的一行语句有错误,请加以改正。改正后程序的输出结果应为: Name:Smith Age:21 ID:99999 CourseNum:12 Record:970 注意:只修改每个“//ERROR****found****”下的那一行,不要改动程序中的其他内容。 include<iostream> using namespace std; class Studentlnfo { protected: //ERROR********************found**************** char Name; int Age; int ID: int CourseNum; float Record; public: Studentlnfo(char*name,int Age,int ID,int coumeNum,float record); //ERROR ********************found******************** void~Studentlnfo{} float AverageRecord{ return Record/CourseNum; } void showconst{ cout<<”Name:”<<Name<<”Age:”<<Age<<”ID:”<<ID <<”CourseNum:”<<CourseNum<<”Record:”<<Record<<endl; } }; //ERROR ******************found************** StudentInfo StudentInfo(char*Name,int Age,int ID,int CourseNum,float Record) { Name=name; Age=age; this一>ID=ID: CourseNum=courseNum: Record=record; } int main { Studentlnfo st(’’Smith”,21,99999,12,970); st.show; return 0; }
(1)char*Name;
(2)~Studentlnfo{}
(3)Studentlnf0::Studentlnfo(char*name,int age,,int ID,int eourseNum,float record)
第5题:
下面程序运行后输出结果是( )。 For I=1 to 2 S=1 For j=0 to I-1 S=S+S*I Next j Print S Next I
A.1 1
B.0 2
C.2 9
D.6 9
第6题:
有以下程序:#include <stdio.h>#include <strine.h> struct STU { char name[10]; int hum;};void f(char * name,iht num){ struct STU s[2] = {{ "SunDan" ,20044} , {" Penghua" ,20045}}; num= s[0]. nnm; strepy(name,s[0], name);}main( ){ struct STU s[2] = {{"YangSan" ,20041 }, { "LiSiGao" ,20042}}, * P; p = &s[1]; f(p->name,p->hum); printf("% s %d \n" ,p-> name,p->num);}程序运行后的输出结果是( )。
A.SunDan 20042
B.SunDan 20044
C.LiSiGuo 20042
D.YangSan 20041
第7题:
下面程序段的输出结果是【 】。
p = 0
s = 0
Do
p = p + 2
s = s + p
Loop While p<11
Print “s=”; s
第8题:
执行以下代码后,下面哪些描述是正确的() public class Student{ private String name = “Jema”; public void setName(String name){ this.name = name; } public String getName(){ return this.name; } public static void main(String[] args){ Student s; System.out.println(s.getName()); } }
第9题:
journal table
clustered table
mapping table
partitioned table
第10题:
STRENG
STRIEG
STREN
STREN0
第11题:
ABC12
ABC45
12345
ABC
第12题:
=
XXX
=XX
X=
第13题:
A、What's your last name?
B、What's your family name?
C、What's your name?
D、What's your first name?
第14题:
有以下程序: #include <string.h> struct STU (char name[10]; int num; }; void f(char *name, int num) {struct STU s[2]={{"SunDan",20044}.{"Penghua",20045}}; num=s[0].num; strcpy(name,s[0].name); } main() {struct STU s[2]={{"YangSall",20041},{"LiSiGao",20042}},*p;p=&s[1]; f(p->name,p->num); printf("%s%d\n",p->name,p->num); } 程序运行后的输出结果是 ______。
A.SunDan 20042
B.SunDan 20044
C.LiSiGuo 20042
D.YangSan 20041
第15题:
若有如下程序: main() { char a[3][5] = {"name","age","sex"},n; for(n=0;n<3;n++) printf("%s\n",a[n]);} 则程序执行后的输出结果是( )。
A.nameagesex
B.name
C.name
D.name agexex ge age sex x sex
第16题:
设有如下程序: #include'string.h" main() { static char s1[20],s2[20]; scanf("%s",s1);scanf("%s",s2); if(strcmp(s1,s2)) printf("@"); else printf("$"); printf("%d\n",strlen(strcat(s1,s2))); } 如果从键盘上输入name1<回车>name2<回车>,则程序运行后的输出结果是( )。
A.$9
B.@11
C.$10
D.@10
第17题:
以下程序的输出结果是______。#include<stdio.h>struct stu{ int num; char name[10]; int age;};void fun(struct stu*p){ printf("%s\n",(*p).name);}main(){ struct stu students[3]={ {9801,"Zhang",20}, { 9802,"Wang",19}, { 9803,"Zhao",18} }; fun(students+2);}
A.Zhang
B.Zhao
C.Wang
D.18
第18题:
A.运行结果显示NameError:name'x'isnotdefined
B.运行结果无限循环输出1
C.它等价于下面的程序#x=1whilex:print(x)
D.它等价于下面的程序whilex:print(x)
第19题:
第20题:
You executed the following code: SQL> CERATE TABLE COUNTRY (COUNTRY_ID CHAR(2) CONSTRAINT COUNTRY_ID_nn NOT NULL, COUNTRY_NAME VARCHAR2(20), CURRENCY_NAME VARCHAR2(20), CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID)) ORGANIZATION INDEX; Which types of tables will be created automatically?()
第21题:
ST#
STR#
STR#0
STR0
第22题:
OK,6
#,6
OK,3
#,3
第23题:
Hua,18,Tong,20
Hua,18,Qin,19
Tong,19,Qin,19
Hua,19,Tong,19
第24题:
to name a few
let alone
not to speak
let's say