请补充函数fun(),该函数的功能是判断一个数是否为回文数。当字符串是回文时,函数返回字符申:yes!,否则函数返回字符串:no!,并在主函数中输出。所谓回文即正向与反向的拼写都一样,例如:abcba。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。
试题程序:
include<string.h>
include<stdio.h>
char *fun(char*str)
{
char *p1,*p2;
int i, t=0;
p1=str;p2=str+strlen(str)-1;
for (i=0;【 】;i++)
if(【 】)
{
t=1;
break;
}
if (【 】)
return("yes!");
else
return("no!");
}
main()
{
char str[50];
printf("Input;");
scanf("%s",str);
printf("%s\n",fun(str));
}
Fox: Chinese citizens, it is clear that privacy rights
enjoy little legal protections. Yet, as attitudes toward
privacy continue to change, the law will eventually be
strengthened.
One Professor thinks that earlier attitudes toward
privacy shaped largely by traditional living arrangements 【S1】______
whereby families of several generations often lived together
in small homes. He notes that the every living space for 【S2】______
urban Chinese had risen from 3.6 square meter in 1978 to 【S3】______
11.4 square meters by 2003, and says this increase has played
important role in fostering expectations of privacy within 【S4】______
the family, especially among the younger generation.
Parents in the past may readily enter a child's room, or read a 【S5】______
child's letters, without asking, and today are likely to incur 【S6】______
the wrath (愤努) of their privacy-conscious children if they
do. A number of academics are going so long as to call 【S7】______
openly for stronger privacy laws.
In the public sphere, it is usually technology, than nosy
parents, that attracts complaints. Though it still lags behind
Britain, which leads the world with its 4.2m surveillance
cameras, but China is installing them at a steady clip. 【S8】______
Shanghai alone has 200,000, and plans to double that number
within five years. The city of Guangzhou has budget $26m 【S9】______
to install security and traffic-monitoring cameras on all its
main streets. Perhaps most high-tech of all is Beijing, where
road cameras, equipped with night-vision capabilities, are
paired with radar guns and can snap the number plates of
speeding motorists at any time of day and night. 【S10】______
【S1】