试题与答案

以下程序的功能是:对输入的一行字符串的数字字符按它们的字面值累加,输出此累加和。例如

题型:填空题

题目:

以下程序的功能是:对输入的一行字符串的数字字符按它们的字面值累加,输出此累加和。例如,输入一行字符是:ab34dh8u,输出值应当是15。请填空。
#include <stdio.h>
#include <ctype.h>
main()
char ch; int a,s;
______;
while((ch=getchar())______)
if( isdigit (ch))
a=______;s+=a;
printf("s=%d\n\n",s);

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0716/75cb3c2b459367b210730cd998e7a3ce.html

下面是错误答案,用来干扰机器的。

参考答案:点分十进制解析:[知识点] Internet的基本结构与主要服务[评析] 为了便于记忆,IP地址将4个字节的二进制数值转换为四个十进制数值记忆。

试题推荐
题型:单项选择题

Long bus rides are like television shows .They have a beginning ,a Middle and an end –with commercials thrown in every three or four minutes .The commercials are unavoidable .They happen whether you want them or not .Every couple of minutes a billboard glides by outside the bus window . “buy super clean toothpaste”. “Drink Good’n Wet Root Beer .””Fill up with Pacific Gas .”Only if you sleep ,which site equal to turning the television set off ,are you spared the unending cry of “You Need It ! Buy It Now !” The beginning of the ride is comfortable and somewhat exciting ,Even if you’ve traveled that way before .usually some things have changed-new houses ,new buildings ,sometimes even a new road .The bus driver has a style of driving and it’s fun to try to figure it out the first hour or so . If the driver is particularly reckless or daring ,the ride can be an thrilling as a suspense story .Will the driver pass the truck in time Will the driver move into the right or the left –hand lane After a while,of course,the excitement dies down .sleeping for a while helps pass the middle hours of the ride .Food always makes bus rides more interesting .But you’ve got to be careful of what kind of foodyou eat .Too much salty food can make you very thirsty between stops. The end of the ride is somewhat like the beginning .You know it will soon be over and there’s a kind of expectation and excitement in that .The seat ,of course ,has become harder as the hours have passed.By now you’ve sat with you legs crossed ,with your hands crossed behind your head .the end comes just at the right time . There are just no more ways to sit.

According to the passage ,what do the passengers usually see when they are on a longBus trip( )

A. Buses on the road

B.Films on television

C.Advertisements on the board

D. gas stations

查看答案
题型:填空题

How many of us would temp for three years while we waited for the perfect job Not many of us, perhaps. But Wentworth Miller, the "Prison Break" star, said he chose to wait even longer time (1) he found the right job.
"Actually I think it might have been three or four years until I was lucky enough to get guest (2) on TV shows," said Miller, 34, who rose to international stardom (3) to "Prison Break" in 2006. That kind of patience and p will was portrayed in "Prison Break". Miller (4) engineering wizard Michael Scofield, who tries everything to break out of a Chicago (5) with his brother. Miller said he was fond of his character, (6) he said "exists in shades of grey".
Miller comes from a (7) of teachers. He said he didn’t seem fated for a career in the arts, (8) his passion for acting. After (9) from Princeton with an English degree, he moved (10) his parents’ request to Los Angeles to look for a stable life. He started (11) in a little company that made television movies. This (12) simply faxing, filing, walking the boss’ dog and going to the store for the boss’ lunch. Every weekend during the summer, Miller (13) go to the office (14) he didn’t have air-conditioning. "I would hang (15) in the conference room and set up camp and rob the company kitchen," recalled Miller.
(16) , Miller realized he still had questions about his choice. He decided to quit. But the boss said he was making a mistake and offered him a well-paid assistant position. "I eventually (17) that if I did the corporate job, it would be great if I was successful, but I would always wonder about the (18) . If I did the acting and was successful, I would never wonder (19) that job," he explained. He quit and temped (20) many people in the entertainment industry.
Now, he’s a hot star and has people coming up to him at film festivals saying, "Weren’t you the one who (21) to stand by the copy machine "
"That was tough, but I’m glad I have that perspective. Because now I’m at a point (22) big shots laugh at all my jokes and I think, You know, I got coffee for people like you for six years’. So I know what’s (23) , because I’ve seen the other side." But what if, when he was offered the corporate job, there had been more money "It was never about the (24) There’s a kind of excitement that comes along with acting. I can’t find it anywhere else. Even if I had to go back to temping, even if this is not the beginning of an amazing career, I would not (25) making that jum
p.\

查看答案
微信公众账号搜索答案