题目
A.your integrity
B.your personality
C.a guide in your life
D.your sense of good
第1题
第2题
字符串str由数字字符‘0’和‘1’组成(长度不超过8个字符),可看作二进制数,请补充函数fun(),该函数的功能是:把str字符串转换成十进制数,结果由函数返回。例如,输入“1001”,结果输出:9。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。
试题程序:
include<stdio.h>
include<stdlib.h>
include<string.h>
int fun(char *str)
{
int n;
char *p=str;
【 】;
p++;
while (*p)
{
n=【 】;
p++;
}
return【 】;
}
main()
{
char str[9];
int i;
int n;
printf ("Enter a string made up of '0' and
'1' digital character:");
gets (str);
if (strlen(str)>8)
{
printf ("Error:string too longer!
please input again !\n\n");
exit(0);
}
for(i=0;str[i];i++)
if(str[i]<'0'||str[i]>'1')
{
printf("Error:%c not is '0'and
'1' digital character !\n\n",
str[i]);
exit(0);
}
printf("The original string:");
puts(str);
n=fun(str);
printf("\n%s is convered to decimal
number:%d\n\n",str,n);
}
第3题
A.sign
B.character
C.nature
D.end
第4题
请补充函数fun(),该函数的功能是:把从主函数中输入的由数字字符组成的字符串转换成—个无符号长整数,并且逆序输出。结果由函数返回。
例如,输入: 1 2 3 4 5 6,结果输出:6 5 4 3 2 1。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。
试题程序:
include<conio.h>
include<stdio.h>
include<string.h>
unsigned long fun(char *S)
{
unsigned long t=0;
int k;
int i=0;
i=strlen(S);
for(【 】;i>=0;i--)
{
k=【 】;
t=【 】;
}
return t;
}
main()
{
char str[8];
clrscr();
printf("Enter a string made up of'0'to
'9'digital character:\n");
gets(str);
printf("The string iS:%S\n",str);
if(strlen(str)>8)
printf("The string is too long!");
else
printf("The result:%lu\n",
fun(str));
}
第5题
A. Binary data up to 4 gigabytes.
B. Character data up to 4 gigabytes.
C. Raw binary data of variable length up to 2 gigabytes.
D. Binary data stored in an external file, up to 4 gigabytes.
E. A hexadecimal string representing the unique address of a row in its table.
第6题
A.Not washing hair on New Year’s
B.Putting up the character of upside-down “Fu” on doors and windows.
C.Giving children red envelopes of money.
D.Having family gatherings.
第7题
Building Renovation
In cities across the United States, old factories,warehouses,schools, railroad stations and other buildings are being renovated for new uses. City planners and private investors are finding that good buildings, no matter how old, can be remodeled for new purposes. "If you'd asked someone four or five years ago whether he'd rent an apartment in an abandoned piano factory or clothing warehouse, he' d have thought you were crazy," says a New York architect. "Today, many people are eager to do it. " The, renovating may include a former city hall or courthouse changed into offices;a bank or church changed into a restaurant; or, as in Plains, Georgia, a railroad station used as a center for a presidential campaign.
Only a few decades ago, renovation was unpopular and generally far more expensive than taking down abandoned buildings, and starting from the beginning.A change began in the 1960s with a number of well-advertised projects, They included Ghirardelli Square in San Francisco,where an old chocolate factory was restored and made into shops and restaurants; Trolley Square in Salt Lake City, where abandoned car warehouses became a shopping mall;the Soho District of New York City, where unused warehouses were made into artists' studios and apartments.
What caused the change? "One reason is nostalgia,"a San Francisco builder suggests."Maybe old is better than new, many people are saying, Feelings about preserving attractive or historic buildings have changed a great deal. " A second cause is economy. The cost of tearing down an old building and constructing a new one from nothing now has risen to the point where it is often less expensive to fix a solid older structure. Also builders realize that fixing up an existing building often requires no new permits, sewer lines, or water connections.
Even when the costs of restoration are the same as or a bit more than the costs of putting up a new building, fixing the old building may be better. A Boston architect says,"The advantage comes when you can develop a final project that is more desirable than a new building one with the right location, more space, more floor area, a special character, materials of a particular quality. " Gradually, architects and builders are developing knowledge about renovation and preservation, bringing imagination and creativity to the job.
第 41 题 In the United States, renovating old buildings_________
A.has had a long history
B.is becoming increasingly popular
C.is still unpopular
D.has just caught the fancy of architects and builders
第8题
字符串str由数字字符组成(长度不超过5个字符),可看作任意进制的数,请补充函数fun(),该函数的功能是:把 str字符串转换成任意进制的数,结果保存在数组xx中,由函数返回转换后数组腆的实际长度。其中x表示str原来的进制, y表示要转换成的进制。例如,输入str=“1111”,x=2,y=10,结果输出:15。如果输入str=“15”, x=10,Y=2,结果输出: 1111。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。
试题程序:
include <stdio.h>
include<stdlib.h>
include<string.h>
define N 8
int xx[N];
int fun(char *str,int x,int y)
{
int sum;
int i=0;
char *p=str;
for(i=0; i<N; i++)
xx[i]=0;
sum=*p-'0';
p++;
while (*p)
{
sum=【 】;
p++;
}
i=0;
while(sum!=0)
{
xx[i]=【 】;
【 】;
i++;
}
return i;
}
main ()
{
char str[6];
int i;
int n;
int x;
int y;
printf("Enter a string made up of '0' to
'9' digits character:");
gets(str);
if(strlen (str) >5)
{
printf("Error:string too longer!,
please input again!\n\n");
exit(0);
}
for(i=0;str[i];i++)
if(str[i]<'0'||str[i]>'9')
{
printf("Error:%c not is '0' to
'9' digits character!\n\n",
str[i]);
exit(0);
}
printf("The original string: ");
puts(str);
printf("\nINPUT x= ");
scanf("%d",&x);
printf("\nINPUT y= ");
scanf("%d",&y);
n=fun(str,x,y);
printf("\n%s is convered to",str);
for (i=n-1; i>=0; i--)
printf("%d",xx[i]);
}
第9题
Only a few decades ago, renovation was unpopular and generally far more expensive than taking down abandoned building and string from the beginning.A change began in the 1960s with a number of well-advertised projects.They included Ghirardelli Square in San Francisco, where an old chocolate factory was restored and made into shops and restaurants, Trolly Square in Salt Lake, where unused warehouses were made into artists’ studios and apartments.
What caused the change? “One reason is nostalgia,” a San Francisco builder suggests.“Maybe old is better than new, many people are saying.Feelings about preserving attractive or historic buildings have changed a great deal.” A second cause is economy.The cost of tearing down an old building and constructing a new one from nothing now has risen to the point where it is often less expensive to fix a solid older structure.Also builders realize that fixing up an existing building often requires no new permits, sewer lines, or water connections.
Even when the costs of restoration are the same as or a bit more than the costs of putting up a new building, fixing the old building may be better.A Boston architect says The advantage comes when you can develop a final project that is more desirable than a new building – one with the right location, more space, more floor area, a special character, materials of a particular quality.” Gradually, architects and builders are developing knowledge about renovation and preservation, bringing imagination and creativity to the job.
16.In the United States, renovating old buildings_____.
A.has had a long history
B.is becoming increasingly popular
C.is still unpopular
D.has just caught the fancy of architects and builders
17.Ghirardelli Square, Trolley Square, and the Soho district are projects that_________.
A.have been given much publicity
B.are little known to the public
C.have been widely discussed among builders and city planners
D.have changed the building business
18.“Nostalgia” in the 3rd paragraph most probably means________.
A.being conservative
B.being keen on saving money
C.being fond of things new
D.being fond of things of the remote past
19.Which of the following statements is true?
A.Every old building can be renovated for new uses
B.Renovating old buildings is always less costly than putting up new ones
C.Renovation does not require imagination and creativity
D.Fixing an old building may have advantages even when it costs a little more
第10题
Mood is a syntactic constituent made up of the Subject and the Predicate. ()
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!