问题 单项选择题

以下程序的运行结果是( )。    #include<iostream.h>    void sub(int x,int y,int *z)    { *z=y-x;}    void main( )    { int a,b,c;      sub(10,5,&A) ;      sub(7,a,&B) ;      sub(a,b,&C) ;      cout < < a < < "," < < b < < "," < < c < < end1;}

A. 5,2,3

B. -5,-12,-7

C. -5,-12,-17

D. 5,-2,-7

答案

参考答案:B

解析:在C++语言中,调用函数不可能改变实参指针变量的值,但可以改变实参指针变量所指变量的值,了解了实参指针变量的改变情况,本题只剩下简单的”加减法”了。

单项选择题

In 1998 consumers could purchase virtually anything over the Internet. Books, compact discs, and even stocks were (1) from World Wide Websites that seemed to (2) almost daily a few years earlier, some people had predicted that consuners accustomed to shopping in stores would be (3) to buy things that they could not see or touch (4) . For a growing number of time-starved consumers, however, shopping from their home computer was proving to be a convenient (5) to driving to the store.

A research estimated that in 1998 US consumers could purchase $ 7.3 billion of goods over the Internet, double the 1997 total. Finding a bargain was getting easier, (6) the rise of online auctions and Websites that did comparison shopping on the Internet for the best (7) .

For all the consumer interest, (8) in eyberspaee was still a largely (9) business, however. Internet pioneer Amazon. eom, which began selling books in 1995 and later (10) into recorded music and videos, posted (11) of $ 153.7 million in the third quarter, up from $ 37.9 million in the same period of 1997. Overall, (12) , the company’ s loss widened to $ 45.2 million from $9.6 million, and analysts did not expect the company to turn a profit (13) 2001. (14) the great loss, Amazon. tom had a stock market value of many billions, reflecting investors’ (15) about the future of the industry.

Internet retailing appealed (16) investors because it provided an efficient means for reaching millions of consumers without having the cost of operating (17) stores with their armies of salespeople. Selling online carried its own risks, however, (18) so many companies competing tor consumers’ attention, price competition was (19) and profit (20) thin or nonexistent.

17()

A.habitual

B.reutilized

C.conventional

D.customary

单项选择题