A.提高权益资本比重,减少财务风险
B.防止股权稀释
C.保持目标资本结构
D.保证综合资本成本最低
E.帮助股东合理避税
第1题
阅读以下说明和C语言函数,将应填入(n)处的字句写在对应栏内。
[说明]
完成以下中序线索化二叉树的算法。
[函数]
Typedef int datatype;
Typedef struct node {
Int ltag, rtag;
Datatype data;
*lchild,* rchild;
}bithptr;
bithptr pre;
void inthread (p );
{if
{inthread (p->lchild );
if (p->lchild==unll ) (1);
if (P->RCHILD=NULL) p->rtag=1;
if (2)
{if (3) pre->rchild=p;
if (p->1tag==1 )(4);
}
INTHREAD (P->RCHILD );
(5);
}
}
第2题
阅读以下函数说明和C语言函数,将应填入(n)处的字句写在对应栏内。
【说明】
给定函数fun的功能是:将从键盘上输入的每个单词的第一个字母转换为大写字母,输入时各单词必须用空格隔开,用“.”结束输入。
【函数】
int fun(char *c,int status)
{
if((1)=='')
return 1;
else
{
if((2)&&(3)&&(4))
(5)='A'-'a';
return 0;
}
}
main()
{
int flag=1;
char ch;
printf("请输入一字符串,用点号结束输入!\n");
do {
ch=getchar();
flag=fun(&ch,flag);
putchar(ch);
}while(ch!='.');
printf("\n");
}
第3题
试题三(共 15 分)
阅读以下说明和 C 程序,将应填入 (n) 处的字句写在答题纸的对应栏内。
第4题
阅读下列函数说明和C代码,将应填入(n)处的字句写在对应栏内。
【说明】
函数QuickSort是在一维数组A[n]上进行快速排序的递归算法。
【函数】
void QuickSort(int A[ ],int s,int t)
{ int i=s,j=t+1,temp;
int x=A[s];
do{
do i ++ ;while (1);
do j -- ;while(A[j]>x);
if(i<j){temp=A[i];(2);(3);}
}while(i<j);
A[a] =A[j];A[j] =x;
if(s<i-1) (4);
if(j+1<t) (5);
}
第5题
●试题四
阅读下列函数说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
函数QuickSort是在一维数组A[n]上进行快速排序的递归算法。
【函数】
void QuickSort(int A[],int s,int t)
{int i=s,j=t+1,temp;
int x=A[s];
do{
do i++;while (1) ;
do j--;while(A[j]>x);
if(i<j){temp=A[i]; (2) ; (3) ;}
}while(i<j);
A[a]=A[j];A[j]=x;
if(s<i-1) (4) ;
if(j+1<t) (5) ;
}
第6题
阅读以下函数说明和C语言函数,将应填入(n)处的字句写在对应栏内。
[说明1]
函数int function(int a)的功能是判断指定的正整数是否为素数,若是,返回1,否则返回0。
[C函数1]
int function(int a)
{ int yes,i;
i=2;yes=1;
while(i<=a/2 && (1) ){
if((2) ) yes=0;
i++;
}
return yes;
}
[说明2]
函数int deleteARR(int*arr,intn)的功能是指定的有序数组压缩成各元素互不相同的有序数组,即相同数只保留一个,多余的被删除。函数返回值是互不相同的元素个数。
[C函数2]
int deleteARR(int*arr,int n)
{ int k,j;
k=0;j=1;
while(j<n){
if((3) )
(4)=arr[j];
j++;
}
return (5);
}
第7题
阅读下列程序说明和C程序,将应填入(n)处的字句写在对应栏内。
[函数2.1说明]
下面程序的功能是计算x和y的最小公倍数。
[函数2.1]
main()
{ int m,n,d,r;
seanf("%d %d",&m,&n);
if(m<n) {r=m;m=n;n=r;}
(1);
while (d%n! =0) (2);
printf("%d\n",d);
}
[函数2.2说明]
下述程序接收键盘输入,直到句点“.”时结束。输入的字符被原样输出,但连续的空格输入将转换成一个空格。
[函数2.2]
include <stdio.h>
main()
{ char c,preChar='\0';
c = getchar();
while(c! = '.'){
if((3)) putchar(c);
else if(preChar! =' ') putchar(c);
(4);
c=(5);
}
}
第8题
阅读以下函数说明和C语言函数,将应填入(n)处的字句写在对应栏内。
【说明】
有n个整数,使其前面各数顺序向后移m个位置,最后m个数变成最前面的m个数。
【函数】
main()
{
int number[20],n,m,i;
printf("the total numbers is:");
scanf("%d",&n);
printf("back m:");
scanf("%d",&m);
for(i=0;i<=n-1;i)
scanf("%d,",&number[i]);
(1);
for(i=0;i<=n-1;i)
printf("%d,",number[i]);
}
move(array,n,m)
int n,m,array[20];
{
int *p,array_end;
array_end=(2);
for(p=array[n-1];(3);p--)
*p=(4);
*array=array_end;
m--;
if(m>0) (5);
}
第9题
阅读以下函数说明和C语言函数,将应填入(n)处的字句写在答题纸的对应栏内。
【函数2.1说明】
递归函数sum(int a[], int n)的返回值是数组a[]的前n个元素之和。
【函数2.1】
int sum (int a[],int n)
{
if(n>0) return (1);
else (2);
}
【函数2.2说明】
有3个整数,设计函数compare(int a,int b,int c)求其中最大的数。
【函数2.2】
int compare (int a, int b, int c )
{ int temp, max;
(3) a:b;
(4) temp:c;
}
【函数2.3说明】
递归函数dec(int a[],int n)判断数组a[]的前n个元素是否是不递增的。不递增返回 1,否则返回0。
【函数2.3】
int dec(int a[], int n )
{
if(n<=1) return 1;
if(a[0]<a[1]) return 0;
return (5);
}
第10题
阅读以下说明,以及用C++在开发过程中所编写的程序代码,将应填入(n)处的字句写在对应栏内。
【说明】
在下面函数横线处填上适当的字句,使其输出结果为:
构造函数.
构造函数.
1,2
5,6
析构函数
析构函数.
【C++代码】
include "iostream.h"
class AA
{ public;
AA(int i,int j)
{A=i; B=j;
cout<<"构造函数.\n";
}
~AA(){(1);}
void print();
private:
int A, B;
};
void AA∷print()
{cout<<A<<","<<B<<endl;}
void main()
{
AA *a1, *a2;
(2)=new AA(1, 2);
a2=new AA(5, 6);
(3);
a2->print();
(4) a1;
(5) a2;
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!