2012年3月全国计算机等级考试二级C语言上机题库完全版
/**found**/
c[t]=’\0’;
3.
fun ss void fun(char *ss) { int i;
for(i=1;i<strlen(ss);i+=2) {if(ss[i]>=’a’&&ss[i]<=’z’) ss[i]-=32; } }
1.
fun n n 10 9.6125588 s=0;
for(i=1;i<=n;i++)
s=s+(2.0*i-1)*(2.0*i+1)/(t*t); 2.
MODI1.C fun substr str /**found**/
for(i=0;str[i];i++) /**found**/
if(substr[k+1]==’\0’) 3.
fun JI 0.0005 0.0005 0.0005 3.14 double fun(double eps) { double s=1,t=1./3; int n=1;
while(t>=eps)
{s+=t;n++;t=t*n/(2.0*n+1) ;}
return(s*2.0); }
1.
fun s t[j]=s[i];j++; for(i=0;i<k;i++) t[j+i]=p[i];
t[j+k]=0; 2.
MODI1.C fun s t1 t2 w
2
t1 t2
/**found**/ while(*w) /**found**/ if(*r==*p) 3.
fun s ASCII t
void fun(char *s,char t[]) { int i,j=0;
for(i=0;i<strlen(s);i++) if(s[i]%2==0)t[j++]=s[i]; t[j]=0; }
1.
fun a s a struct student *
fun(struct student*a) for(i=0;i<3;i++) a->score[i]+=1; return a; 2.
MODI1.C fun N
/**found**/
char *fun(char (*sq)[M]) /**found**/ return sp; 3.
fun a b c a c b c #include <stdio.h>
void fun(int a,int b,long *c)
{ *c=(b%10)*1000+(a/10)*100+(b/10)*10+a%10; }
1.
fun n n
p=(n%2==0)?n/2:n/2+1; a[i]=a[p+i]; a[p+i]=t; 2.


