[函数说明3.1] 假设以带头结点的单循环链表作非递减有序线性表的存储结构。函数deleteklist(LinkList head)的功能是删除表中所有数值相同的多余元素,并释放结点空间。 [函数3.1] Void deleteklist (LinkList head) LinkNode *p,*q; p=head->next; while (p!=head) q=p->next; while( (1) ) (2) ; free(q); q=p->next; p=p->next; [函数说明3.2] 已知一棵完全二叉树存放于一个一维数组T[n]中,T[n]中存放的是各结点的值。下面的程序的功能是:从T[0]开始顺序读出各结点的值,建立该二叉树的二叉链表表示。 [函数3.2] #include<istream.h> typedef struct node int data; stuct node leftChild,rightchild; BintreeNode; typedef BintreeNode *BinaryTree; void ConstrucTree(int T[] , int n, int i, BintreeNode *&ptr) if(i>=n) (3) ; /*置根指针为空*/ else ptr=(BTNode*) malloc(sizeof(BTNode)) ptr->data=T[i]; ConstrucTree (T,n, 2*i+1, (4) ); ConstrucTree (T,n, (5) ,ptr->rightchild); main(void) /*根据顺序存储结构建立二叉链表*/ Binarytree bitree; int n; printf("please enter the number of node: \n%s"; n); int *A=(int*)malloc (n*sizeof (int)) ; for (int i=0; i<n; i++) scanf("%d" ,A+i); /*从键盘输入结点值*/ for (int i=0; i<n; i++) printf("%d",A[i]); ConstructTree (A,n, 0,bitree);
查看答案
会计电算化档案包括机内会计数据,软盘等备份的会计数据,以及打印输出的会计凭证、账簿、报表等数据。()
A. 对
B. 错
Passage Two
A. The Investments in financial assets.
B. The accumulation of past savings of income.
C. The money we hold in cash.
D. The net revenue in the transaction.
Section One Directions: In this section, you will hear ten short statements. Each statement will be spoken only once. After each statement, there will be a pause. During the pause, you must read the four suggested answers marked A, B, C and D, and decide which is the best answer.
A. The foreign banks should have set up a representative office.
B. The foreign banks can’t apply for a branch.
C. The foreign banks can’t expand business in China.
D. The foreign banks are forbidden to set up a representative office.
[说明] 下面程序是为汽车市场编制的一个程序的一部分。其中automobile是基类。 [Java程序] class MainJava public static void main (String agr[] car sedan=new car; sedan.initialize (24, 20.0, 4); System.out.println("The sedan can travel" + (1) +"miles.\n"); System.out .println("The sedan has" + (2) +"doors.\n"); class automobile protected int miles_per_gallon; //汽车每加仑行驶公里数 (3) double fuel_capacity; //油箱容积 public void initialize (int in_mpg, int in_fuel) miles_per_gallon=in_mpg; fuel_capacity=in_fuel; public int get_mpg() //提供一辆特定汽车每加仑公里数 return miles_per_gallon; public double get_fuel() //提供油箱容积 return fuel_capacity; public double travel_distance() //计算满油箱情况下的可行驶总公里数 return (4) ; class car (5) private int Total_doors; public void initialize(int in_mpg, double in_fuel, int doors) Total_doors=doors; miles_per_gallon=in_mpg; fuel_capacity=in_fuel; public int doors() return Total_doors;