问题 填空题

以下函数把b字符串连接到a字符串的后面,并返回a中新字符串的长度。请填空。
strcen(char a[],char b[])
int num=0,n=0;
while(*(a+num)! = 【15】 )num++;
while(b[n])*(a+num)=b[n];num++; 【16】
return(num);

答案

参考答案:’\0’或0或NULL n++或++n或n+=1或n=n+1或n=1+n

解析: 第一个循环是为了计算a字符串的长度,字符串以NULL结束,所以第一个空应填 ’\0’或0或NULL;第二个循环是为了在a字符串的后面加上b字符串,num++是为了将a字符串的下标向前移动,毫无疑问,b字符串的下标也必须向前移动,所以第二个空必须填n++或与此等功能的其他表达式。

填空题


A Sports体育运动
Many animals engage in play,but homo sapiens is the only animal (1) have invented sports.Since sports are an invention,a part of culture (2) than an aspect of nature,all definitions of sports are somewhat arbitrary. (3) sports are a human universal found in every known culture or a (4) unique to modern society depends upon one’s definition of sports.Men and (5) have always run,jumped,climbed,lifted,thrown, and wrestled,but they have (6) always performed these physical activities competitively. Although all literate societies seem to (7) contests of one sort or another in which men, and sometimes women, (8) in displays and tests of physical skill and prowess,sports may be (9) defined as physical contests performed for their own sake and not for (10) ulterior end.According to this strict definition,neither Neolithic hunters nor contestants (11) religious ceremonies such as the ancient Olympic Games were engaged in sports. (12) on the stipulation that sports must be performed for their own sake (13) the paradoxical elimination of many activities which are usually thought of as (14) ,such as exercises done for the sake of cardiovascular fitness,races run (15) satisfy a physical education requirement,ball games played to earn a paycheck. (16) definition also means abandonment of the traditional usage in which"sport,"derived (17) Middle English disporter,refers to any light hearted recreational activity.In the. (18) of some 18th- century aristocrats,a game of backgammon and the seduction of (19) milkmaid were both considered good sport,but this usage of the term (20) become archaic.

问答题 简答题