问题 单项选择题

现有定义int a;double b;float c;char k;,则表达式a/b+c-k值的类型为

A.int

B.double

C.float

D.char

答案

参考答案:B

解析: 双目运算中两边运算量类型转换规律:
运算数1 运算数2 转换结果类型
短整型 长整型 短整型->长整型
整型 长整型 整型->长整型
字符型 整型 字符型->整型
有符号整型 无符号整型 有符号整型->无符号整型
整型 浮点型 整型->浮点型
在a/b的时候,a、b的类型不一致,根据类型转换规则,把整型转换成double类型,之后的加、减类似。转化规则为char,short→int→unsigned→long→double←float。

阅读理解
阅读理解。
                        Welcome to City Library
    City Library is open to everyone every day and the library card is
free. You can borrow five books, one CD and as many videos as you want
at a time-three weeks for books, one week for CDs and videos.
        BOOKS
○ picture books for
   children
○ books in 36
   languages
○ stories of all kinds
   You can enjoy 
   newspapers and
   magazines in the
   reading room. You
   can't take them out
   of the library.
         VIDEO
○ all kinds of video
   films
○ TV plays
○ Music videos You
   can't watch videos
   here. You can borrow
   a video for a week
   for $1



         AUDIO
○ music (rock,
   pop, jazz…)
○ language (语言)
   tapes (42 main
   languages in the 
   world) You can
   enjoy listening
   in the special rooms
   here. All the CDs
   can be borrowed
   -Free!
1. If you want to get a library card, you _____.
[ ]
A. have to pay one dollar for it
B. needn't pay for it
C. need to borrow five books first
D. need to make a card
2. You can borrow _____ at a time.
[ ]
A. only one video
B. two CDs
C. five books
D. six books
3. At the library, you can _____.
[ ]
A. buy CDs
B. read magazines
C. watch the videos
D. buy cartoons
4. According to (根据) the library rules, you can't _____.
[ ]
A. take newspapers home
B. borrow CDs from the library
C. listen to music at the library
D. write in a book
5. The library has _____?
[ ]
A. books in 42 languages
B. no language tapes
C. listening to the tape
D. all kinds of video films
单项选择题