设变量已正确定义,则以下能正确计算f=n!的程序段是()
A.f=0:for(j=1;j<=n;j++)f*=j;
B.f=1;for(j=1;j<n;j++)f*=j;
C.f=1;for(j=n;j>1;j++)f*=j;
D.f=1for(j=n;j>-2;j--)f*=j;
A.f=0:for(j=1;j<=n;j++)f*=j;
B.f=1;for(j=1;j<n;j++)f*=j;
C.f=1;for(j=n;j>1;j++)f*=j;
D.f=1for(j=n;j>-2;j--)f*=j;
若有下列定义(设int类型变量占两个字节),则i=【 】 ,j=【 】。 int i=8,j=9;float x=123.456; print("i=%oj=%o\n",i,j);
A.publicAa=new、A0;
B.publicAa=A();
C.A、a=new、classO;
D.a、A;
设函数f(x)在(-∞,+∞)内有定义,xo≠0是函数f(x)的极大值点,则().
A.xo必是函数f(x)的驻点
B.﹣xo必是函数﹣f(﹣x)的最小值点
C.﹣xo必是函数﹣f(﹣x)的极小值点
D.对一切x都有f(x)≤f(xo)
A.printf("%s",s);
B.for(i=0;i<9;i++)printf("%c",s[i]);
C.puts(s);
D.for(i=0;i<9;i++)puts(c[i]);
设有以下函数:yoidfun(intn,char*s){……}则下面对函数指针的定义和赋值均正确的是
A.yoid*Pf0;pf=fun;
B.yoid(*pf)(int,char*);pf=fun;
C.yoid*pff);*pf=fun;
D.yoid(*pf)(int,char);pf=&fun;
设f(x)在R上有定义,h>0为常数,称△hf(x)=f(x+h)-f(x)为f(x)的步长为h的一阶差分. (1)证明:△h[cf(x)]=c△hf(x)(c为常数), △h[f1(x)+f2(x)]=△hf1(x)+△hf2(x); (2)若定义△nhf(x)=△n[△n-1hf(x)],n=2,3,…是f(x)的步长为h的n阶差分,用数学归纳法证明:
A.*((*ptr+1)[2])
B.*(*(p+5))
C.*((*ptr+1)+4)
D.*(*(p+1)+2)