题目内容

在文件in71.dat中有200组数据,每组有3个数,每个数均为3位数。函数readDat()的功能是读取这200组数据并存放到结构数组aa中。请编制函数jsSort(),其函数的功能是:要求在200组数据中找出条件为每组数据中的第一个数大于第二个数加第三个数之和,其中满足条件的个数作为函数jsSort()的返回值,同时把满足条件的数据存入结构数组bb中,再对bb中的数按照每组数据的第一个数加第三个数之和的大小进行升序排列(第一个数加第三个数的和均不相等),排序后的结果仍重新存入结构数组bb中。最后调用函数writeDat()把结果bb输出到文件out71.dat中。 注意:部分源程序已给出。 请勿改动主函数main()、读函数readDat()和写函数writeDat()的内容。 试题程序: #include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct int x1,x2,x3; Data; Data aa[200],bb[200]; void readDat(); void writeDat(); int jsSort() void main() int count; readDat(); count=jsSort(); writeDat(count); void readDat() FILE * in; int i; in=fopen("IN71.dat","r"); for(i=0;i<200;i + +) fscanf(in,"% d % d % d",&aa[i].x1,&aa[i].x2,&aa[i].x3); fclose(in); void writeDat(int count) FILE * out; int i; system("CLS"); out=fopen("OUT71.dat","w"); for(i=0;i<count;i + +) printf("% d,% d,% d 第一个数+第三个数=% d\n",bb[i].x1,bb[i].x2,bb[i].x3,bb[i].x1+bb[i].x3); fprintf(out,"% d,% 5d,% d\n",bb[i].x1,bb[i].x2,bb[i].x3); fclose(out);

查看答案
更多问题

Section One Directions: There are three passages in this section. Each passage is followed by some questions or unfinished statements. For each of them, there are four choices marked A, B, C and D. You should make the best choice and mark the corresponding letter on the ANSWER SHEET by drawing a single line through the center.Passage 1 New securities by companies are usually brought to market after advice and a commitment to underwrite by an investment banking firm. Underwriting simply means that the investment banker promises to buy the securities. The investment bank helps design the security and the investment banker buys it from the issuer with the intent of selling it to investors as quickly as possible. Usually, the issue is not subscribed to in its entirety by the original investment banker but is syndicated among other institutions as well. Through the syndication process, the original investment banker invites others to subscribe to a part of the issue, receiving a predetermined portion of the fees in return. The original investment banker becomes known as the lead manager of the deal. ff there is more than one lead, the group is referred to as co-lead managers. The firm that deals directly with the company will be responsible for any syndication formation and also for final payment on behalf of the syndicate. It is referred to as the book runner for the issue. New issues of common stock come into two varieties-primary distributions and secondary distributions. Primaries are sales of stock that have never been issued before. There are two types of primary distributions-initial public offerings (IPOs) and additional floats of companies’ stock that will dilute each shareholder’s existing holding. Of the two, the latter are more common in the new issues market for equities since they involve offerings of shares of larger, more mature companies seeking additional equity capital. Secondary distributions are sales of stock that previously existed in some form or other but are too large to be accommodated on the stock exchanges. Procedures for secondaries often follow those for primaries although the offering period is much shorter and may involve a matter of hours rather than days. The actual marketing for these issues is done by investment bankers directly to the public. On rare occasions, companies have attempted to sell their shares or bonds directly to the public, avoiding investment banking fees. Unless the company is very well known, such attempts are less than successful. The behavior of investment bankers is key to the reception of new issues and directly affects the cost of capital for a company. As a result, the choice of an investment banker is crucial for a company, and the wrong choice could affect its costs over the near tenrm. This is true for bonds as well as for common stocks. The actual marketing for new issues ______.

A. is usually done by investment bankers indirectly to the public
B. is, most of the time, done by the companies directly to the public
C. is never done by the companies directly to the public
D. is usually done by the investment banker directly to the public

Section One Directions: There are three passages in this section. Each passage is followed by some questions or unfinished statements. For each of them, there are four choices marked A, B, C and D. You should make the best choice and mark the corresponding letter on the ANSWER SHEET by drawing a single line through the center.Passage 1 New securities by companies are usually brought to market after advice and a commitment to underwrite by an investment banking firm. Underwriting simply means that the investment banker promises to buy the securities. The investment bank helps design the security and the investment banker buys it from the issuer with the intent of selling it to investors as quickly as possible. Usually, the issue is not subscribed to in its entirety by the original investment banker but is syndicated among other institutions as well. Through the syndication process, the original investment banker invites others to subscribe to a part of the issue, receiving a predetermined portion of the fees in return. The original investment banker becomes known as the lead manager of the deal. ff there is more than one lead, the group is referred to as co-lead managers. The firm that deals directly with the company will be responsible for any syndication formation and also for final payment on behalf of the syndicate. It is referred to as the book runner for the issue. New issues of common stock come into two varieties-primary distributions and secondary distributions. Primaries are sales of stock that have never been issued before. There are two types of primary distributions-initial public offerings (IPOs) and additional floats of companies’ stock that will dilute each shareholder’s existing holding. Of the two, the latter are more common in the new issues market for equities since they involve offerings of shares of larger, more mature companies seeking additional equity capital. Secondary distributions are sales of stock that previously existed in some form or other but are too large to be accommodated on the stock exchanges. Procedures for secondaries often follow those for primaries although the offering period is much shorter and may involve a matter of hours rather than days. The actual marketing for these issues is done by investment bankers directly to the public. On rare occasions, companies have attempted to sell their shares or bonds directly to the public, avoiding investment banking fees. Unless the company is very well known, such attempts are less than successful. The behavior of investment bankers is key to the reception of new issues and directly affects the cost of capital for a company. As a result, the choice of an investment banker is crucial for a company, and the wrong choice could affect its costs over the near tenrm. This is true for bonds as well as for common stocks. None of the following statements is true except ______.

A. initial public offerings will dilute each shareholder’s existing holding
B. additional floats of companies stock will dilute each shareholder’s existing holding
C. compared with additional floats, initial public offerings are more common in the new issues market for equities
D. initial public offerings usually involve offerings of shares of larger, more mature companies seeking additional equity capital

Directions: In this section, you will hear ten short conversations. At the end of each conversation, a question will be asked about what was said. The conversation and question will be spoken only once. During the pause, you must read the four choices marked A, B, C, D, and decide which is the best answer. Then mark the corresponding letter on the ANSWER SHEET with a single line through the center.

A. To serve as a source of last resort.
B. To be one of the major objectives.
C. To transfer depositors’ funds from one bank to another.
D. To borrow emergency funds from the Fed.

Section One Directions: There are three passages in this section. Each passage is followed by some questions or unfinished statements. For each of them, there are four choices marked A, B, C and D. You should make the best choice and mark the corresponding letter on the ANSWER SHEET by drawing a single line through the center.Passage 1 New securities by companies are usually brought to market after advice and a commitment to underwrite by an investment banking firm. Underwriting simply means that the investment banker promises to buy the securities. The investment bank helps design the security and the investment banker buys it from the issuer with the intent of selling it to investors as quickly as possible. Usually, the issue is not subscribed to in its entirety by the original investment banker but is syndicated among other institutions as well. Through the syndication process, the original investment banker invites others to subscribe to a part of the issue, receiving a predetermined portion of the fees in return. The original investment banker becomes known as the lead manager of the deal. ff there is more than one lead, the group is referred to as co-lead managers. The firm that deals directly with the company will be responsible for any syndication formation and also for final payment on behalf of the syndicate. It is referred to as the book runner for the issue. New issues of common stock come into two varieties-primary distributions and secondary distributions. Primaries are sales of stock that have never been issued before. There are two types of primary distributions-initial public offerings (IPOs) and additional floats of companies’ stock that will dilute each shareholder’s existing holding. Of the two, the latter are more common in the new issues market for equities since they involve offerings of shares of larger, more mature companies seeking additional equity capital. Secondary distributions are sales of stock that previously existed in some form or other but are too large to be accommodated on the stock exchanges. Procedures for secondaries often follow those for primaries although the offering period is much shorter and may involve a matter of hours rather than days. The actual marketing for these issues is done by investment bankers directly to the public. On rare occasions, companies have attempted to sell their shares or bonds directly to the public, avoiding investment banking fees. Unless the company is very well known, such attempts are less than successful. The behavior of investment bankers is key to the reception of new issues and directly affects the cost of capital for a company. As a result, the choice of an investment banker is crucial for a company, and the wrong choice could affect its costs over the near tenrm. This is true for bonds as well as for common stocks. When the issue is syndicated among the original investment banker and other institutions, ______.

A. there is only one lead manager
B. there must be more than one lead manager
C. all the parties concerned are lead managers
D. there is one lead manager or more than one lead manager

答案查题题库