You should not try to ____ while others are talking.
A. interrupt
B. deliver
C. extend
D. pretend
第1题:
这段代码有什么不足之处?
try {
Connection conn = ...;
Statement stmt = ...;
ResultSet rs = stmt.executeQuery("select * from table1");
while(rs.next()) {
}
} catch(Exception ex) {
}
第2题:
以下结构属于条件结构的是?
A.switch…case…end
B.try…catch...end
C.do…while
D.while…end
第3题:
14、以下python程序的输出结果的类型是什么? def printinfo(arg1, **others): print(others) printinfo(1,p=2,q=3)
第4题:
阅读以下函数说明和C语言函数,将应填入(n)处的字句写在对应栏内。
【函数2.1】
void sort(char *s,int num)
{int i,j--num;
char t;
while(j-->1)
for(i=0;i<j;i++)
if(s[i]>s[i+1])
{t=s[i];
s[i]=s[i+1];
s[i+1]=t;
}
void main()
{char *s="CEAedea";
sort(s,5);
printf("%s",s);
}
上述程序的结果是(1)
【函数2.2】
void main()
{ union {int ig[6];
Char s[12];} try;
try. ig[0]=0x4542; try.ig[1]=0x2049;
try. ig[2]=0x494a; try.ig[3]=0x474e;
try. ig[4]=0x0a21; try.ig[5]=0x0000;
pintf("%s",try, s);
}
上述程序的结果是(2)
【函数2.3】
void main()
{ char *letter[5]= { "ab","efgh","ijk","nmop","st"};
char **p;
int i;
p=letter;
for(i=0;i<4;i++) .
printf("%s",p[i]);
}
上述程序的结果是(3)
【函数2.4】
main()
{int i=4,j=6,k=8,*p=&I,*q=&j,*r=&k;
int x,y,z;
x=p==&i;
y=3*-*p/(*q)+7;
z=*(r=&k)=*p**q;
printf("x=%d,y=%d,z=%d",x,y,z);
}
上述程序的结果是(4)
【函数2.5】
int a[]={5,4,3,2,1 };
void main()
{int i;
int f=a[0];
int x=2;
for(i=0;i<5;i++)
f+=f*x+a[i];
printf("%d",f);
}
上述程序的结果是(5)
第5题:
以下while循环控制循环体执行10次。p=10; while ~mod(p,2) p=p+1 end
第6题:
用于程序异常处理的关键词语句是:
A.if...else
B.for
C.try...except
D.while