对于下面递归函数fun,调用fun(3) 的返回值是( )。fun(int n){ return ((n>0) ? 2*fun(n-1)+fun(n-2) : -1); }
A. -11
B. -17
C. -15
D. -13
查看答案
阅读以下程序,当输入10时,输出结果是( )。#include void fun(int n){ if (n/2) fun(n/2); printf("%d",n%2);}int main(){ int a; printf(“请输入一个自然数:"); scanf("%d",&a); fun(a); printf("\n"); return 0;}
A. 1
B. 10
C. 1010
D. 0101
下面函数中能正确计算n!(n<17)的是( )。
A. long f(long n){return n*f(n-1);}
B. ong f(long n){ if(n<=1)return 1;else return n*f(n);}
C. long f(long n){ static long s,i;for(i=1;i<=n;i++)s=s*i;return s;}
D. long f(long n) { long s=1,i;for(i=1;i<=n;i++)s=s*i;return s;
A(n) _________ to an information resource is any danger to which a system may be exposed.
A. exposure
B. risk
C. threat
D. vulnerability
The _________ of an information resource is the harm, loss, or damage that can result if a threat compromises that resource.
A. exposure
B. risk
C. threat
D. vulnerability