试题与答案

下列程序的功能是将字符串s中所有的字符c删除。请填空。 #include<stdi

题型:填空题

题目:

下列程序的功能是将字符串s中所有的字符c删除。请填空。
#include<stdio.h>
main()
char s[80];
int i,j;
gets(s);
for(i=j=0;s[i] !=’\0’;i++)
if(s[i] !=’c’)______;
s[j]=’\0’;
puts(s);

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2021/0913/bb629a6234e0256c0fea0dfd5794af0b.html

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

参考答案:252H解析: 要解答本题,首先要明白在对指针进行加、减运算时,数字“1”不是+进制数的“1”,而是指“1”个存储单元长度。1个存储单元长度占存储空间的多少,应该视具体情况而定,如果存储单元的基类...

试题推荐
题型:阅读理解

Have you seen the film Star Wars? If you have, you’ll know what an energy–gun is, and a light–sword too. The gigantic space ship in Star Wars can destroy a whole planet in a second or two, and it does so. Fortunately, it isn’t our planet; it belongs to a distant system, far out in space.

The great empty spaces of the universe are no problem in star Wars. The fighters know how to fold space over, like a sheet of paper, so that very distant stars are brought close together; they call it “hyperspace”. This means, of course, that their ships don’t have to creep along at the speed of light. If they did that, they would take years, even centuries, to reach the battlefield. Hyperspace allows them to travel as “supralight” speed and get there in a couple of hours. It’s good clean fun (健康无害的娱乐) though.

We certainly don’t know all about physics yet, but we do have the work of Albert Einstein. He asked us to believe that nothing could travel faster than light through an empty space --- but don’t let that miserable idea spoil the film for you, even though all our observations up to now have shown that Einstein was dead right --- forget it. Sit back and watch those energy–shells blow up the hated enemy. The Star Wars princess is extremely beautiful.

The more we “discover”, the more we must admire Einstein. He knew it all before us --- by about 1910 in fact. We observe certain very high speed particles (微粒), and they behave exactly as Einstein predicted they would. We can give them a speed almost equal to light, but they never quite reach light speed. He predicted that a very fast–moving object, as it flashed by a stationary observer(静止的参照物), would seem to have much greater weight than usual. And that, too, was proved correct.

So far as scientific theory or evidence is concerned, there is no such thing as hyperspace, no such speed as supralight. Space is as we know it, and light speed is the highest possible speed. “But,” say the story-writers, “that’s only true at present. We don’t know all about physics yet. Who knows --- who knows if there isn’t another set of facts just waiting to be discovered; another universe perhaps, just round the corner?”

Einstein seems to have been prepared for that too. In his theories he emphasized the word “relative”. Everything --- speed, weight, time, etc. --- is relative to something else. Nothing, by itself is real or absolute. So if there is another universe somewhere, we shall only know about it relative to ourselves. So far there’s no sign of it. But for the future, well, who knows?

51.What is the purpose of science – fiction stories and films?

They point out the way ahead, and scientists are grateful.

They encourage us in our searching for the truth.

They show us what the future universe will be like.

They are written and made to entertain us.

52.If you see Star Wars, what might spoil it for you, according to the passage?

A.Einstein’s theories.          

B.The uncomfortable surroundings of the theatre.

       C.The ugly actress and actors.   

D.The rude audience.

53.Einstein predicted that the increase in weight          .

applies only to big things, like huge space–ships

is apparent only to the stationary observer

is a real increase       

remains even after the objective has stopped moving

54.Einstein’s theories emphasized          .

A.everything is relative to something else         B.the universe is infinite (无限的)

C.light speed is the highest possible speed     D.there is another universe somewhere

55.Although Einstein did not observe the behavior of high–speed objects,         .

his theories predicted they travels at light speed

his theories predicted them with great accuracy

he knew they would be discovered       

he predicted them in the year 1910

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