题目内容

以上程序的输出结果是______。 #define MIN(x,y) (x)<(y)(x):(y) main() { int a=5,b=2,c=3,d=3,t: t=MIN(a+b,c+d)*10;printf("%d\n" t);}

查看答案
更多问题

请编制程序,其功能是:将一个字符串中连续相同的字符仅用一个字符代替,生成一个新的字符串。字符串以00H结束,长度不超过20个字节。 例如: 原字符串为:41H,41H,41H,42H,31H,31H,...,00H(’AAAB11’) 新字符串为:41H,42H,31H,...,00H(’AB1’) 部分程序已给出,其中原始数据由过程LOAD从文件INPUT1.DAT中读入SOURCE开始的内存单元中,运算结果要求从RESULT开始存放,由过程SAVE保存到文件OUTPUT1.DAT中。 请填空BEGIN和END之间已给出的源程序使其完整,空白已用横线标出,每个空白一般只需一条指令,但采用功能相当的多条指令亦可,或删除BEGIN和END之间原有的代码并自行编程来完成所要求的功能。 对程序必须进行汇编,并与IO.OBJ链接产生可执行文件,最终运行程序产生结果。调试中若发现整个程序中存在错误之处,请加以修改。 [试题程序] EXTRN LOAD:FAR,SAVE:FAR LEN EQU 20 DSEG SEGMENT SOURCE DB LEN DUP() RESULT DB LEN DUP(0) NAME0 DB ’INPUT1.DAT’,0 NAME1 DB ’OUTPUT1.DAT’,0 DSEG ENDS SSEG SEGMENT STACK DW 256 DUP() SSEG ENDS CSEG SEGMENT ASSUME CS:CSEG,SS:SSEG,DS:DSEG START PROC FAR PUSH DS XOR AX,AX PUSH AX MOV AX,DSEG MOV DS,AX LEA DX,SOURCE LEA SI,NAME0 MOV CX,LEN CALL LOAD ;LOAD STRING FROM FILE ; ******BEGIN****** ;在BEGIN和END之间补充代码 ; ******END****** LEA DX,RESULT LEA SI,NAME1 CALL SAVE ;SAVE RESULT TO FILE RET START ENDP CSEG ENDS END START

Biologically, there is only one quality which distinguishes us from animals: the ability to laugh. In a universe which appears to be utterly deficient of humor, we enjoy this supreme luxury. And it is a luxury, for unlike any other bodily process, laughter does not seem to serve a biologically useful purpose. In a divided world, laughter is a unifying force. Human beings oppose each other on a great many issues. Nations may disagree about systems of government and human relations may be plagued by ideological clans and political camps, but we all share the ability to laugh. And laughter, in turn, depends on that most complex and subtle of all human qualities: a sense of humor. Certain comic stereotypes have a universal appeal. This can best be seen from the world-wide popularity of Charlie Chaplin’s early films. As that great commentator on human affairs, Dr. Samuel Johnson, once remarked, "men have been wise in very different modes; but they have always laughed in the same way." A sense of humor may take various forms and laughter may be anything from refined tinkle( 清脆的声响)to an earth quaking roar, but the effect is always the same. Humor helps us to maintain a correct sense of values. It is the one quality which political fanatics(狂热者)appear to lack. If we can see the funny side, we never make the mistake of taking ourselves too seriously. We are always reminded that tragedy is not really far removed from comedy, so we never get one-sided view of things. This is one of the chief functions of satire(讽刺)and irony. Human pain and suffering arc so grim; we hover so often on the brink of war; political realities are usually enough to plunge us into total despair. In such circumstances, cartoons and satirical accounts of serious political events redress the balance. They take the wind out of arrogant politicians who have lost their sense of proportion. They enable us to see that many of our most profound actions are merely comic or absurd. We laugh when a great satirist like Swift writes about war in Gulliver’s Travels. The Lilliputians and their neighbors attack each other because they can’t agree which end to break an egg. We laugh because we are meant to laugh; but we are meant to weep too. It is too powerful a weapon to be allowed to flourish. The sense of humor must be singled out as man’s most important quality because it is associated with laughter. And laughter, in turn, is associated with happiness. Courage, determination, initiative—these are qualities we share with other forms of life. But the sense of humor is uniquely human. If happiness is one of the great goals of life, then it is the sense of humor that provides the key. The most important character exclusive to human beings is ______ .

A. humor
B. courage
C. determination
D. initiative

Throughout George Bush’s presidency, the federal government has refused to support any regulation of the greenhouse gases that cause global warming. Whenever the subject comes up, officials tend to mumble(咕哝)about uncertainties. But on April 2nd, the Supreme Court at last settled one of the biggest outstanding questions: whether the government has the authority to curb emissions in the first place. The court ruled that the Clean Air Act—a law from the 1960 designed to combat smog—gives the Environmental Protection Agency (EPA)the power to regulate carbon dioxide, the main greenhouse gas. It also said the EPA would need an excuse if it decided not to use this power. It dismissed the justifications the EPA had provided for inaction—that emissions from American cars were insignificant in the grand scheme of things and that unilateral action by America would undermine efforts to achieve international consensus on global warming—as inadequate. Strictly speaking, the ruling applies only to emissions from vehicles, but a very similar case regarding coal-fired power plants is pending(未决的)in federal court. The EPA says it is now examining the ruling. The EPA might examine it for some time, of course. Any regulations it comes up with in response might still defer action into the distant future, since the law allows the EPA to delay implementation until appropriate technology can be acquired at a reasonable cost. Even if it proceeds quite swiftly, a new president and Congress with globe-cooling ideas of their own will be in place long before any new rules come into effect. That suits the environmental lobby just fine. They hope the ruling will spur Congress to address global warming with proper legislation. After all, it makes little sense for such an important issue to be tackled tangentially(无关的)through a 40-year-old taw. And if 2009 sees the inauguration of a greener president, he or she will now have the power to dictate stricter fuel efficiency, in the form of lower CO2 emissions, without reference to Congress. California set an example. In 2002, the state assembly passed a law regulating emissions of CO2 from vehicles, based on a provision of the Clean Air Act that allows California to adopt stricter pollution standards than the federal government. Carmakers have challenged the law, in part on the ground that CO2 was not an air pollutant. The car industry quickly declared that the issue of global warming is best handled at the federal level by Congress. On what basis do California carmakers question the law of controlling CO2 emission

A. The state assembly has no authority to pass the law.
B. CO2 is not an air that pollutes the air.
CO2 is not an air that causes global warming.
D. The Congress has not accepted the law yet.

Throughout George Bush’s presidency, the federal government has refused to support any regulation of the greenhouse gases that cause global warming. Whenever the subject comes up, officials tend to mumble(咕哝)about uncertainties. But on April 2nd, the Supreme Court at last settled one of the biggest outstanding questions: whether the government has the authority to curb emissions in the first place. The court ruled that the Clean Air Act—a law from the 1960 designed to combat smog—gives the Environmental Protection Agency (EPA)the power to regulate carbon dioxide, the main greenhouse gas. It also said the EPA would need an excuse if it decided not to use this power. It dismissed the justifications the EPA had provided for inaction—that emissions from American cars were insignificant in the grand scheme of things and that unilateral action by America would undermine efforts to achieve international consensus on global warming—as inadequate. Strictly speaking, the ruling applies only to emissions from vehicles, but a very similar case regarding coal-fired power plants is pending(未决的)in federal court. The EPA says it is now examining the ruling. The EPA might examine it for some time, of course. Any regulations it comes up with in response might still defer action into the distant future, since the law allows the EPA to delay implementation until appropriate technology can be acquired at a reasonable cost. Even if it proceeds quite swiftly, a new president and Congress with globe-cooling ideas of their own will be in place long before any new rules come into effect. That suits the environmental lobby just fine. They hope the ruling will spur Congress to address global warming with proper legislation. After all, it makes little sense for such an important issue to be tackled tangentially(无关的)through a 40-year-old taw. And if 2009 sees the inauguration of a greener president, he or she will now have the power to dictate stricter fuel efficiency, in the form of lower CO2 emissions, without reference to Congress. California set an example. In 2002, the state assembly passed a law regulating emissions of CO2 from vehicles, based on a provision of the Clean Air Act that allows California to adopt stricter pollution standards than the federal government. Carmakers have challenged the law, in part on the ground that CO2 was not an air pollutant. The car industry quickly declared that the issue of global warming is best handled at the federal level by Congress. Under what conditions can the EPA put off its action

A. No new regulations.
B. No new president and Congress.
C. No appropriate technology.
D. No swift proceeding.

答案查题题库