请编写函数fun(),该函数的功能是将M行N列的二维数组中的数据,按列的顺序依次放到一维数组中。 例如:二维数组中的数据为 33333333 44444444 55555555 则一维数组中的内容应是 334455334455334455334455。 注意:部分源程序以存在文件test_2.cpp中。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。 文件test39_2.cpp的内容如下: #include<stdio.h> #include<iostream.h> void fun(int(*s) [10],int *b, int *n,int mm,int nn) void main( ) int w[10][10]=33,33,33,33,44,44,44,44,55,55,55,55,i,j; int a[100]=0, n=0; cout<<"The matrix:\n" for(i=0; i<3; i++) for(j=0; j<4; j++ cout<<w[i] [j]; cout<<endl; fun(w, a, &n, 3, 4); cout<<"The A array:\n"; for(i=0; i<n; i++) cout<<a[i]; cout<<"\n\n";
查看答案
A person;s home is as much a reflection of his personality as the clothes he wears,the food he eats and the friends with whom he spends his time.Depending on personality,most have in mind a(n)“ (1) home”.But in general,and especially for the student or new wage earners,there are practical (2) of cash and location on achieving that idea. Cash (3) ,in fact,often means that the only way of (4) when you leave school is to stay at home for a while until things (5) financially.There are obvious (6) of living at home—personal laundry is usually (7) done along with the family wash;meals are provided and there will be a well-established circle of friends to (8) .And there is (9) the responsibility for paying bills,rates,etc. On the other hand, (10) depends on how a family gets on.Do your parents like your friendsYou may love your family— (11) do you like themAre you prepared to be (12) when your parents ask where you are going in the evening and what time you expect to be back If you find that you cannot manage a(n) (13) , and that you finally have the money to leave, how do you (14) finding somewhere else to live If you plan to stay in your home area, the possibilities are (15) well-known to you already. Friends and the local paper are always (16) . If you are going to work in a (17) area, again there are the papers—and the accommodation agencies, (18) these should be approached with (19) . Agencies are allowed to charge a fee, usually the (20) of the first week’s rent, if you take accommodation they have found for you.
A. still
B. always
C. habitually
D. consequently
Scientists around the world are racing to learn how to rapidly diagnose,treat and stop the spread of a new,deadly disease.SARS—Severe Acute Respiratory Syndrome—was (1) for the first time in February 2003 in Hanoi, (2) since then has infected more than 1,600 people in 15 countries,killing 63.At this (3) ,there are more questions than answers surrounding the disease. Symptoms start (4) a fever over 100.4 degrees F,chills,headache or body (5) .Within a week,the patient has a dry cough,which might (6) to shortness of breath.In 10% to 20% of cases,patients require (7) ventilation to breathe.About 3.5% die from the disease.Symptoms (8) begin in two to seven days,but some reports suggest it (9) take as long as 10 days.Scientists are close to (10) a lab test to diagnose SARS.In the meantime,it is diagnosed by its symptoms.There is no evidence (11) antibiotics or antiviral medicines help, (12) 至doctors can offer only supportive care.Patients with SARS arekept in isolation to reduce the risk of (13) .Scientists aren’t sure yet,but some researchers think it’s a (14) discovered coronavirus,the family of viruses that cause some common colds. Most cases appear to have been passed (15) droplets expelled when infected patients cough or sneeze.Family members of infected people and medical workers who care (16) them have been most likely to (17) the illness.But recent developments in Hong Kong suggest that the (18) might spread through air,or that the virus might (19) for two to three hours on doorknobs or other (20) .Health experts say it is unlikely,though,that sharing an elevator briefly with an infected person would be enough to pass the virus.
A. continue
B. linger
C. delay
D. persist
The normal human daily cycle of activity is of some 7-8 hours’sleep alternation with some 16-17 hours’wakefulness and that the sleep normally coincides (1) the hours of darkness.Our present concern is with how easily and to what extent this (2) can be modified. The question is no mere academic one.The ease with which people can change from working in the day to working at night is a (3) of growing importance in industry where automation (4) round-the-clock working of machines.It normally (5) from five days to one week for a person to adapt to a (6) routine of sleep and wakefulness,sleeping during the day and working at night. (7) ,it is often the case in industry that shifts are changed every week.This means that no sooner has he got used to one routine (8) he has to change to another, (9) much of his time is spent neither working nor sleeping very (10) . One answer would seem to be (11) periods on each shift,a month,or even three months. (12) ,recent research has shown that people on such systems will revert to go back to their (13) habits of sleep and wakefulness during the weekend and that this is quite enough to destroy any (14) to night work built up during the week.The only real solution appears to be to hand over the night shift to those permanent night workers whose (15) may persist through all weekends and holidays.
A. as
B. when
C. then
D. than
A person;s home is as much a reflection of his personality as the clothes he wears,the food he eats and the friends with whom he spends his time.Depending on personality,most have in mind a(n)“ (1) home”.But in general,and especially for the student or new wage earners,there are practical (2) of cash and location on achieving that idea. Cash (3) ,in fact,often means that the only way of (4) when you leave school is to stay at home for a while until things (5) financially.There are obvious (6) of living at home—personal laundry is usually (7) done along with the family wash;meals are provided and there will be a well-established circle of friends to (8) .And there is (9) the responsibility for paying bills,rates,etc. On the other hand, (10) depends on how a family gets on.Do your parents like your friendsYou may love your family— (11) do you like themAre you prepared to be (12) when your parents ask where you are going in the evening and what time you expect to be back If you find that you cannot manage a(n) (13) , and that you finally have the money to leave, how do you (14) finding somewhere else to live If you plan to stay in your home area, the possibilities are (15) well-known to you already. Friends and the local paper are always (16) . If you are going to work in a (17) area, again there are the papers—and the accommodation agencies, (18) these should be approached with (19) . Agencies are allowed to charge a fee, usually the (20) of the first week’s rent, if you take accommodation they have found for you.
A. getting over
B. getting in
C. getting back
D. getting along