13. 当用户要求输入的字符串中含有空格时,应使用的输入函数是( )

13. 当用户要求输入的字符串中含有空格时,应使用的输入函数是( )
A) scanf() B) getchar() C) gets() D) getc()
14. 以下关于字符串的叙述中正确的是( )
A)C语言中有字符串类型的常量和变量
B)两个字符串中的字符个数相同时才能进行字符串大小的比较
C)可以用关系运算符对字符串的大小进行比较
D)空串一定比空格打头的字符串小
15. 以下程序段的输出结果是( )
char s[ ]= “\\141\141abc\t”;
printf(“%d\n”,strlen(s));
A) 14 B) 12 c) 13 D) 9
16. 可在C程序中用做用户标识符的一组标识符是( )
A)1and B)Date C)Hi D)case
_2007 y-m-d Dr.Tom Bigl
17. 有以下程序 ( )
void main()
{ unsigned int a;
int b=-1;
a=b;
printf("%u",a);}程序运行后的输出结果是( )
A) -1 B) 65535 C) 32767 D) -32768
18. 以下程序的输出结果是( )
void main()
{ int i,x[3][3]={1,2,3,4,5,6,7,8,9};
for(i=0;i<3;i++)printf("%d",x[i][2-i]);}
A)1,5,9 B) 1,4,7 C) 3,5,7 D) 3,6,9
19. 下面程序的输出结果是( )
void main()
{ int a[ ]={1,2,3,4,5,6,7,8,9,0},*p;
p=a;
printf(“%d\n”,*p+9);}
A)0 B) 1 C) 10 D) 9
20. 有以下程序
#include<stdio.h>
struct tt
{ int x;struct tt *y; } *p;
struct tt a[4]={20,a+1,15,a+2,30,a+3,17,a};
void main()
{ int i;p=a;
for(i=1;i<=2;i++){printf("%d,",p->x);p=p->y;} }
程序的运行结果是( )
A) 20,30 B) 30,17 C) 15,30 D) 20,15

第1个回答  2013-11-26
答案是C
相似回答