问题
单项选择题
对建立良好的程序设计风格,下列描述中正确的是( )。
A.程序应该简单、清晰、可读性好
B.符号名的命名只需要符合语法
C.充分考虑程序的执行效率
D.程序的注释可有可无
答案
参考答案:A
解析: “清晰第一,效率第二”,在考虑到程序的执行效率的同时,一定要保证程序清晰、可读;对符号名的命名,除了要符合语法要求外,还要具有一定的含义;程序的注释可以帮助程序员理解程序,不是可有可无的。
对建立良好的程序设计风格,下列描述中正确的是( )。
A.程序应该简单、清晰、可读性好
B.符号名的命名只需要符合语法
C.充分考虑程序的执行效率
D.程序的注释可有可无
参考答案:A
解析: “清晰第一,效率第二”,在考虑到程序的执行效率的同时,一定要保证程序清晰、可读;对符号名的命名,除了要符合语法要求外,还要具有一定的含义;程序的注释可以帮助程序员理解程序,不是可有可无的。
用方框中所给的单词的适当形式填空,使短文正确、通顺。每词限用一次。
![]() Thailand's most celebrated festival is the Songkran Festival. It starts on April 13 and小题1:_____________for three days. Songkran is a Thai word which means "move" or change places" as it is the day whenthe sun changes its position. It is also小题2:_____________as the "Water Festival" because people believe that water will wash away the bad luck. The Thai people小题3:_____________ this festival with water . Everyone gets wet and since it is the小题4:_____________season of the year, the custom is quite enjoyable. Songkran is a Public Spring Cleaning Day , supported by the local小题5:____________. Anything old or useless must be thrown away or it will小题6:_____________the bad luck to the owner. During the festival, young people put scented (有香味的)water into the小题7:_____________of elders and parents as a kind of respect. The elders in return小题8:_____________the young people good luck. People also pour water over each小题9:_____________ Thailand is almost completely an agricultural society and this has also been a perfect time to take a小题10:_____________from hard work. |