8 If you need to use formal parameters to directly access and modify the actual parameter values, you should describe the formal parameters as () parameters.
A. value parameter
B. real address
C. pointer
D. address parameters
查看答案
9 For a given n elements, there are () kinds of logical structures that can be constructed.
A. 3
B. 4
C. 5
D. 6
10 In the following program segment, the sentence frequency of x = x + 1; is (). for( i=1;i<=n;i++) for( j=1;j<=n;j++) x=x+1;
A. O(2n)
B. O(n)
C. O(n^2)
D. O(log2n)
11 The time complexity of the following function sum (n) is ( ). sum (int n) { int sum=0; for(i=1;i<=n;i++) { p=1; for(j=1;j<=i;j++) p*=j; sum+=p; } return(sum); }
A. O(2n)
B. O(n)
C. O(n^2)
D. O(log2n)
12 There is the following recursive function fact (n), whose time complexity is( ). int fact (int n) { if(n<=1) return 1; else return(n*fact(n-1)); }
A. O(2n)
B. O(n)
C. O(n^2)
D. O(log2n)