问题 单项选择题

下列程序的执行结果为( )。
public class c3

public static void main (String args[])

int i=13,j=10;
if (i-->j)
i++;
else j--;
System. out.println (i+"\t"+j);

A.13 10

B.12 11

C.11 11

D.12 12

答案

参考答案:A

解析: 程序是由if-else语句构成的流程,分析判断条件,变量i和j做比较,得到条件表达式的值为true,然后执行i-1,现在变量i的值为12,而j的值为10;由于条件表达式为 true,则执行i++,因此i的值为13,并跳过else子句块,循环控制语句执行完毕,这时变量i和i的值分别为13和10。

阅读理解

阅读理解。

     Wugging, or web-use giving, describes the act of giving to charity at no cost to the user. By using

Everyclick.com, which is being added to a number of university computers across the UK, students can

raise money every time they search, but it won't cost them a penny.

     Research shows that students are extremely passionate about supporting charity - 88% of full time

students have used the Internet to give to charity. This age group is often the least likely to have their own

income. 19% of 22 to 24 year olds have short-term debts of more than £5,000. With rising personal debt

levels in this age group, due to university tuition fees or personal loans and a lack of long-term savings,

traditional methods of donating to charity are often not appealing or possible. Beth Truman, a 21 year old

recent university graduate, has used everyclick.com to donate to her chosen charity, the RSPCA, for two

years and has seen the "wugging" grow in popularity with students."When you're at university you become

more socially aware, but it's sometimes hard to give to others when you have little money yourself," says

Beth."Wugging is great for people in this age group as it allows them to use the technology on a daily basis

to give to charity, without costing them a single penny."

      Wugging is perfect for people who want to be more socially aware and supportive but don't feel they

have the means to do so. Students using the web can raise money for causes they care about without

costing them anything in terms of time or money, and charities get a valuable source of funding. Everyclick.

com works like any other search engine, allowing users to search for information, news and images but users

can decide which of the UK's 170,000 charities they would like to support through their clicks. Everyclick.

com then makes monthly payments to every registered charity. Launched in June 2005, Everyclick.com is

now the eighth largest search engine and one of the busiest charity websites in the UK.

1. In the case of charity, everyclick.com ______.

A. frees students of the financial worries

B. receives much money from students

C. offers valuable information to students

D. praises students for their money-raising

2. What does Beth Truman think of the "wugging" movement?

A. It makes Everyclick.com popular in the UK.

B. It becomes easy to do charity because of it.

C. It results in students' more social awareness.

D. It helps students to save money.

3. From the passage, we can conclude that ______.

A. most full time students do charity on the Internet every day

B. Everyclick.com helps students pay for the college education

C. "wugging" is a win-win idea for both students and charities

D. Everyclick.com is the most successful search engine in the UK

问答题 简答题