问题 单项选择题

在16位IBM-PC机上使用C语言,若有如下定义 struct data {int i; char ch; double f; } b; 则结构变量b占用内存的字节数是

A.1

B.2

C.7

D.11

答案

参考答案:D

解析: 结构体变量所占用内存的字节数是其所有成员所占用内存字节数之和。本题中整型变量i所占用的内存是2字节,字符型变量ch所占用的内存是1字节,双精度型变量f所占用的内存是8字节,三者相加即可。

完形填空
完形填空。
     Like most people, I was brought up to look upon life as a process of getting. It was not until in my late
thirties that I made this important   1  : giving-away makes life so much more exciting. You need not worry
if you   2   money.
     his is how I   3   with giving-away. If an idea for improving the window display of a neighborhood store
   4   to me, I step in and make the suggestion to the   5  . If an accident takes place, the   6   of which I think
the local police could use, I   7   him up and tell him about it, though I am not in   8   here. One discovery I
made about this world is to give   9   getting something back, though the   10   often comes in an unexpected
form.
     One Sunday morning the local post office delivered an important special letter to my home, though it was
   11   to me at my office. I wrote the postmaster a note of   12  . More than a year later I needed a post-office
box for a new business I was  13 . I was told at the window that there were  14   boxes left, and that my name
would have to go on a long  15  list. As I was about to  16   the post office, the postmaster appeared in the 
  17   ."Wasn't it you that wrote us that letter a year ago about delivering an  18  delivery to your home?" I said
it was."Well, you certainly are going to have a box in this post office   19   we make one for you. You don't
know what a letter like that means to us. We  20  get nothing but complaints."
( )1. A. decision  
( )2. A. earn       
( )3. A. experienced 
( )4. A. happens   
( )5. A. customer   
( )6. A. story     
( )7. A. call       
( )8. A. need       
( )9. A. plus       
( )10.  A. process 
( )11.  A. replied 
( )12. A. invitation
( )13. A. dealing 
( )14. A. enough   
( )15. A. admitting 
( )16. A. leave   
( )17. A. window   
( )18. A. unfamiliar
( )19. A. in case 
( )20.  A. even     
B. research   
B. lack       
B. connected 
B. occurs     
B. headmaster 
B. damage     
B. hold       
B. trouble   
B. without   
B. goal       
B. addressed 
B. apology   
B. providing 
B. some       
B. relating   
B. shout     
B. doorway   
B. unexpected 
B. now that   
B. hardly     
C. speech   
C. spend     
C. cooperated 
C. sticks   
C. storekeeper
C. challenge 
C. break     
C. common   
C. for       
C. return   
C. driven   
C. complaint 
C. applying 
C. no       
C. examining 
C. guess     
C. home     
C. unknown   
C. even if   
C. usually   
D. discovery         
D. steal             
D. agreed            
D. leads             
D. policeman         
D. material          
D. pick              
D. charge            
D. before            
D. concern           
D. brought           
D. appreciation      
D. starting          
D. more              
D. waiting           
D. act               
D. yard              
D. uncertain         
D. as if             
D. rather            
单项选择题