题目内容

请补充main函数,该函数的功能是:从键盘输入一个字符串及一个指定字符,然后把这个字符及其后面的所有字符全部删除。结果仍然保存在原串中。 例如,输入“abcdef”,指定字符为‘e’,则输出“abcd”。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在 main函数的横线上填入所编写的若干表达式或语句。 试题程序: #include <stdio. h> #define N 80 main () { int i=0; char str [N]; char ch; clrscr (); printf{"\n Input a string:\n"); gets (str); printf("kn Input a charator;\n"); scanf ("%c", &ch); while (str [i] !=’\0’) { if (str [i]==ch) 【1】 【2】 ; } str[i]= 【3】 ; printf{"\n*** display string ***\n"); puts (str); }

查看答案
更多问题

Pisa is an Italian city known for its Leaning Tower.The Tower, interestingly enough, started leaning in the middle of its construction — when its first three stories were completed. Bonnano Pisano, the engineer in charge, tried to correct the lean by making the new stories slightly taller on the short side, only to find that the added marble caused the Tower to sink still further. Work was suspended several times as engineers sought fresh solutions, until the Tower was finished in the 14th century, still leaning. The construction, begun in 1174, nearly took 200 years.In modern times the structure has been several times strengthened by cement, but to this day it is still in danger of collapse. Various schemes have been under consideration for saving, it. To rebuild an upright tower would be easy enough for modern engineering, but it would not be the same edifice as people love and remember it. The Leaning Tower must be left leaning, saved, not reconstructed. There is nothing really wrong with a leaning tower — after all, Galileo climbed to the top and did his experiment by throwing down weights. In the meantime, the Tower has been closed to the public since 1990. When did the Tower begin to lean()

At the beginning of its construction.
B. In the middle of its construction.
C. When the construction was finally finished.
D. Nobody knows about it.

In October 1961 at Crowley Field in Cincinnati Ohio an old deaf gentleman named William E. Hoy stood up to throw the first ball of the World Series. Most people at Crowley Field on that day probably did not remember Hoy because he had retired (退休) from profess-ional baseball 58 years earlier in 1903. However he had been an outstanding player and the deaf people still talk about him and his years in baseball.William E. Hoy was born in Houckstown Ohio on May 23, 1862. He became deaf when he was two years old. He attended the Columbus Ohio School for the deaf. After graduation he started playing baseball while working as a shoemaker.Hoy began playing professional baseball in 1886 for Oshkosh (Wisconsin) of the Northw- estern League. In 1888 he started as an outfielder (外场手) with the old Washington Senators. His small figure and speed made him an outstanding base runner. He was very good at stealing bases during his career. In the 1888 major league season he stole 82 bases. He was also the Senators’ leading hitter in 1888. Hoy was clever and he threw right-handed and batted left-handed, on June 19, 1889 he threw out three batters (击球手) at the plate from his outfield position.The arm signals used by judges today to show balls and strikes began because of Hoy. The judge lifted his right arm to show that the pitch was a strike and his left arm to signal that it was a ball.For many years people talked about Hoy’s last ball game in 1903. He was playing for Los Angeles of the Pacific Coast Winter League. It was a memorable game because Hoy hit a wonderful ball which won the game. It was a very foggy day and therefore very hard to see the ball. In the ninth inning (棒球的一局) with two men out, Hoy managed to catch a fly ball to make the third out in spite of the fog. Los Angeles defeated their opposition and won the game.After he retired Hoy stayed busy. He ran a dairy farm near Cincinnati for 20 years. He also became a public speaker and traveled giving speeches. Until a few years before his death he took 4—10 mile walks several mornings a week. On December 15,1961 William Hoy died at the age of 99. In which order did the following things happen in Hoy’s life()a. Hoy worked as a shoemaker.b. Hoy began to run a diary farm.c. Hoy played a memorable game in the heavy fog.d. Hoy threw the first ball of the World Series.e. Hoy became deaf.

A. d e a e b
B. e a b c d
C. d a e c b
D. e a c b d

甲素知乙家有钱,且每天白天只有一老妇看家,遂起抢劫意念。为使抢劫顺利,甲先盗窃军用手枪一支,子弹十发。一切准备就绪后,将枪弹藏于身上,来到乙家。时逢老妇偶然外出,甲撬门入室,发现室内无人,于是窃得现金及其他财物总价值一万余元。正准备逃离时,老妇回来,甲遂开枪致老妇重伤后,逃离现场。 请问: 该犯罪形态的处断原则是什么

承担大型软件开发任务的程序员,必须遵守哪些规定

答案查题题库