问题 单项选择题

下列程序的输出结果是( )。 #include<stdio.h> main() { char a[]={'a','b','c','d','e','f','\0'}; int i,j; i=sizeof(A) ; j=strlen(A) ; printf("%d,%d",i,j); }

A.7,7

B.7,6

C.6,6

D.6,7

答案

参考答案:B

解析: sizeof()函数的功能是返回字符串所占的字节数,strlen()函数的功能是返回字符串的长度,其中'\0'是一个转义字符,它占存储空间,但不计入串的长度。

阅读理解
阅读理解。

Movies in Green Movie Theater This Week

                      Happy Feet
American movie
Director: George Miller
Stars: Elijah Wood, Brittany Murphy,
Hugh Jackman, Nicole Kidman
Time: From Monday to Wednesday,
at 6:00 pm
Ticket Price: $2 
         The Secret of the Magic Courd
Chinese movie
Director: Zhu Jiaxin and Zhong Zhixing
Stars: Liang Yongqi, Liu Qingyun,
Zhu Qilong
Time: From Friday to Sunday, at 6:30 pm
Ticket Price: $3 (half the price on Sunday
for children)
         Arthur and the Minimoys
American movie
Director: Luc Besson
Stars: Freddie Highmore, Madonna,
Mia Farrow
Time: From Wednesday to Friday,
at 9:00 pm
Ticket Price: $6
             Little Miss Sunshine
American movie
Director: Jonathan Dayton,
Valerie Faris
Stars: Alan Arkin, Abigail Breslin
Time: From Tuesday to Saturday,
at 9:30 am
Ticket Price: $3.5
1. There is _____ in Green Movie Theater this week.
A. one Chinese movie
B. two Chinese movies
C. two American movies
D. three Chinese movies
2. If a man with his child goes to Green Movie Theater on Sunday, they'll pay _____ for the movie.
A. $3
B. $3.5
C. $4.5
D. $6
3. You can see the movie _____ in Green Movie Theater on Friday morning.
A. Happy Feet
B. Arthur and the Minimoys
C. The Secret of the Magic Gourd
D. Little Miss Sunshine
4. There are three movies on _____ and _____.
A. Wednesday, Friday
B. Tuesday, Wednesday
C. Monday, Thursday
D. Saturday, Sunday
5. From this poster (海报), we know _____ is a director.
A. Liang Yongqi
B. Alan Arkin
C. Luc Besson
D. Mia Farrow
单项选择题