题目内容

[说明] 函数diff的功能是:根据两个由整数(都大于-32768)按升序构成的单链表L1和L2(分别由A,B指向)构造一个单链表L3(由*r指向),要求L3中的所有整数都是L1并且不是L2中的整数,还要求L3中的所有整数都两两不等。 [函数] #include <malloc.h> typedef struct node int d; struct node *next Node; void diff (Node *A, Node *B, Node **r) int lastnum; Node *p; * r=NULL ; if (!A) return; while( (1) ) if (A->d < B->d) lastnum=A->d; p=(Node*) malloc (sizeof (Node)) ; p->d=lastnum; p->next=*r; (2) ; do A=A->next ; while( (3) ); else if (A->d> B->d) B=B->next ; else (4) ; lastnum=A->d; while (A&&A->d==last num) A=A->next ; while (A) lastnum=A->d; p=(Node*) malloc (sizeof (Node)) ; p->d=lastnum; (5) ; *r=p; while(A&&A->d==lastnum) A=A->next;

查看答案
更多问题

有一房地产,利用该宗房地产正常情况下每年所获得的总收益为20万元;每年所需支出的总费用为12万元,该类房地产的资本化率为8%,则该宗房地产的收益价格为()万元

The audience in the theatre waited until the curtain had risen and then ______into applause.

A. made
B. cheered
C. burst
D. got

Next week, as millions of families gather for their Thanksgiving (感恩节) feasts, many other Americans will go without. According to the United States Department of Agriculture, more than 12 million households lack enough food for everyone in their family at some time during the year—including holidays. Hunger is surprisingly widespread in our country—one of the world’’s wealthiest—yet the government estimates that we waste almost 100 billion pounds of food each year, more than one-quarter of our total supply. Reducing this improper distribution of resources is a goal of America’’s Second Harvest, the nation’’s largest domestic hunger-relief organization. Last year, it distributed nearly 2 billion pounds of food to more than 23 million people in need. America’’s Second Harvest is a network of 214 inter-connected food banks and other organizations that gather food from growers, processors, grocery stores and restaurants. In turn, the network distributes food to some 50,000 soup kitchens, homeless shelters and old people’’s centers in every county of every state. A great deal of work is involved in distributing tons of food from thousands of donors (捐赠者) to hundreds of small, nonprofit organizations. Until a few years ago, America’’s Second Harvest lacked any effective way to manage their inventory. Without accurate and timely information, soup kitchens were sometimes empty while food was left to spoil in loading places. In 2000, America’’s Second Harvest began to use a new inventory and financial-management system—Ceres. It is software designed specifically for hunger-relief operations. It is used by more than 100 America’’s Second Harvest organizations to track food from donation to distribution. Ceres has helped reduce the spoiling of food and improve distribution. An evaluation found that the software streamlined food banks’’ operations by 23 percent in the first year alone. With more accurate and timely reports, Ceres saves time, flees staff members to focus on finding new donors, and promises more efficient use of donations. Hunger in America remains a troubling social problem. Technology alone cannot solve it. But in the hands of organizations such as America’’s Second Harvest, it is a powerful tool that is helping to make a difference—and helping more Americans to join in the feast. The main idea of the passage is that______.

A. technology can help in the fight against hunger
B. America’s Second Harvest has found more donors
C. America’s Second Harvest promotes the development of technology
D. hunger is a problem even in the wealthiest country in the world

Man: I heard that Parker Electronics is going to be holding interviews on campus next week. Woman: Yeah What day I’’d like to talk to them and drop off my resume. Question: What does the woman want to do

A. Julie has a large mouth.
B. They made their engagement public.
C. The news of their engagement is spreading.
D. The man thinks the woman gossips too much.

答案查题题库