全国信息技术应用考试

String date="Today is Sunday.";String str2=data.CharAt(s.length( )-1);则str2为()A、yB、.C、nullD、false

题目

String date="Today is Sunday.";String str2=data.CharAt(s.length( )-1);则str2为()

  • A、y
  • B、.
  • C、null
  • D、false
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

“What _________ is today?” “It’s Sunday.”

A.date

B.wrong

C.weather

D.day


正确答案:D

第2题:

下面的哪些程序段可能导致错误? ( ) Ⅰ: String s = "Gone with the wind"; String t = "good "; String k = s + t; Ⅱ: String s = "Gone with the wind"; String t; t = s[3] + "one"; Ⅲ: String s = "Gone with the wind"; String standard = s.toUpperCase(); Ⅳ: String s = "home directory"; String t = s-"directory":

A.Ⅱ、Ⅲ

B.Ⅱ、Ⅳ

C.Ⅰ、Ⅳ

D.Ⅲ、Ⅳ


正确答案:B
解析:本题是考杳对String操作符的理解和应用。Ⅰ段中,String类型可以直接使用+进行连接运算:Ⅱ段中,String是一种Object,而不是简单的字符数组,不能使用下标运算符取其值的某个元素,错误;Ⅲ段中, toUppelCase0方法是String对象的一个方法,作用是将字符串的内容全部转换为大写并返回转换后的结果(String类型);IV段中,String类型不能进行减(—)运算,错误。

第3题:

–____________________? –It’s Sunday.

(A) What time is it?

(B) When is it?

(C) What’s the date today?

(D) What day is today?

正确答案:D

解答参考:D 本题考查 “今天是星期几”的问法,


正确答案:D 
解答参考:D 本题考查 “今天是星期几”的问法,正确答案D。  

第4题:

The more popular sequence of dating today is ________.

A.date-month-year

B.year-date-month

C.month-year-date

D.date-year-month


正确答案:A

第5题:

A: What's the date today? B: It's April 1st.()


参考答案: 正确

第6题:

下列程序的运行结果是()。 include main() {stmct date {int year,month,day; }today;

下列程序的运行结果是( )。

#include<stdio.h>

main()

{stmct date

{int year,month,day;

}today;

primf("%d\n",sizeof(struct date));

}

A.8

B.6

C.10

D.12


正确答案:B
解析:解答本题需要注意两个知识点:①结构体变量的长度是其内部成员长度的总和,本题中,struct date中包含year、month、day这3个整型变量,一个整型变量占2个字节:②sizeof是求所占字节数的运算符。

第7题:

听力原文:M: Oh, my God! Jessica. It's five p. m. now. Tomorrow is Saturday. The credit will expire on Sunday. Weekend is non-business day. We cannot make it today. What shall we do?

W: Don't worry. Banks will accept presentation on the following business day.

Q: When will the bank deal with the credit if the expiry date of a credit fails on a non-business day?

(19)

A.On every business day.

B.On Tuesday.

C.On Wednesday.

D.On the following business day.


正确答案:D
解析:根据女士的回答,贷款在假期期间到期时,银行将在下一个工作日办理。

第8题:

-- What's the date today? --___________.

A.It's a fine day

B. It's Friday

C. It's on Christmas Day

D. It's June 26th


正确答案:D

第9题:

下列日常生活用语英汉对照错误的是()。

A、What time is it?几点钟了?

B、Hold on,please!请别挂断。

C、Today is March1st,2010.今天是2010年4月1号。

D、What’s the date today?今天是几号?


参考答案:C

第10题:

在下面的代码段中填入一个适当的语句,表示从输入流中能读取对象。(注:FilelnputStream的形象为theTime)

FilelnputStreamin=______;

bjectlnputStreams=ObjectlnputStream(in);

Stringtoday=(String)s.readObject();

Datedata=(Date)S.readObject();


正确答案:newFilelnputStream("theTime"):
newFilelnputStream("theTime"): 解析: 题中对象输入流ObjectlnputStream的对象s是以一个文件输入流为基础构造的。程序中使用readObiect()方法从对象流s中读取一个Date类型的对象。读对象时要按照它们写入的顺序读取,因为readObject[[)返回的是Object类型的对象,所以程序中使用了强制类别转换,将所读取对象的类型转换为Date类型。

更多相关问题