问题 单项选择题

关于多行结构条件语句的执行过程,正确的是

A.各个条件所对应的<语句序列>中,一定有一个<语句序列>被执行

B.找到<条件>为TRUE的第一个入口,便从此开始执行其后的所有<语句序列>

C.若有多个<条件>为TRUE,则它们对应的<语句序列>都被执行

D.多行选择结构中的<语句序列>,有可能任何一个<语句序列>都不被执行

答案

参考答案:D

解析: 在执行多行结构条件语句的过程中,自上而下地对测试表达式进行判断,一旦发现某测试表达式成立,就执行与之相关的语句,其余部分跳过。如果没有条件成立,就执行最后的Else块;如果没有最后一条 Else,并且所有条件均不成立,那么不执行任何操作。根据以上知识点可知选项D正确。

单项选择题 A型题
单项选择题

Questions 6~10


Lighting up a cigarette at home could bring a visit from Honduran police if a family member or even a visitor complains about secondhand smoke. A new law that took effect on Monday banning smoking in most public and private spaces doesn’t actually outlaw cigarettes inside homes, but it does have a provision allowing people to file complaints about secondhand smoke in homes. Violations would bring a verbal warning on the first offense. After that could come arrest and a $311 fine—the equivalent of the monthly minimum wage in this Central American country.
Even some anti-smoking advocates suspect that part of the law may not work. "It seems its intention is to educate by way of complaints, a move that I do not find very feasible," said Armando Peruga, a program manager at the World Health Organization’s Tobacco-Free Initiative. He did praise Honduras for adopting a broad anti-smoking law, noting it is only the 29th nation to adopt such a law out of WHO’s 193 member states. But Peruga said the clause allowing family members to call police on their smoker relatives is confusing. The clause "does not make much sense since the law clearly does not prohibit smoking at homes".
The law bans smoking in most closed public or private spaces and orders smokers to stand at least 1.8 meters away from nonsmokers in any open space. The law explicitly bans smoking in schools, gas stations, nightclubs, restaurants, bars, buses, taxis, stadiums and cultural centers hut it doesn’t clearly ban smoking at home. Still, one clause says that "families or individuals may complain to law enforcement authorities when smokers expose them to secondhand smoke in private places and family homes".
"The law is clear and we will comply with it," said Rony Portillo, director of the Institute to Prevent Alcoholism and Drug Addiction. "Authorities will intervene (at a home) when someone makes a complaint. " Some say the law will be almost impossible to enforce in a country of 8 million people with a rampant crime problem and only 12,000 police officers. "Police won’t be able to enforce it because they can barely keep up with the crime wave that has been overwhelming us to be able to go after those who are smoking at home," said Jose Martinez, a 38-year-old computer engineer who has smoked for 20 years.
The law also outlaws all advertising for tobacco products and requires photos of lungs affected by cancer to be placed on cigarette packs. Tobacco and cigarette companies have 60 days to comply with both requirements.
In Honduras, 30 percent of the people smoke, and nine out of 10 Hondurans suffering from acute bronchitis live in homes where there is a smoker, according to Honduran health authorities.

In Honduras, people have acute bronchitis mainly because they ______.

A. dine in restaurants with smokers
B. have regular smokers in homes
C. patronize smoke-filled nightclubs
D. work long term in tobacco companies