首页
>
计算机类
>
等级考试
>
计算机二级
>
C语言程序设计
> 设有数组定义: char str[]= ”China”;则下面的输出为
printf( “%d”,strlen(str));
设有数组定义: char str[]= ”China”;则下面的输出为
printf( “%d”,strlen(str));
A.4
B.5
C.6
D.7
查看答案
正确答案:
C
答案分析:
无
包含此试题的试卷:
2021年c语言程序设计试题
相关的试题
当执行下面的程序时,如果输入 ABC,则输出结果是( )。 #include #include main() { char ss[10]="1 ,2,3,4,5" : gets(ss);strcat(ss ,"6789");printf("%s " ,ss); }
A.4
B.5
C.6
D.7
查看答案
有以下程序:输出的结果是( )。 #include< struct stu { int num; char name[10] : int age;} void fun(struct stu*p) {printf("%s " ,(*p).name);} tllain() { struct stu students[3]={{9801 ,"Zhang".20} , {98...
A.4
B.5
C.6
D.7
查看答案
设charstr[100];inti=5;则引用数组元素的错误形式是()
A.4
B.5
C.6
D.7
查看答案
设charstring[]="This_is_a_book!";则数组的长度应是____________。
A.4
B.5
C.6
D.7
查看答案
下面是一个JavaApplication的主类的定义,其功能是输出所有命令行参数。importjava.io.*;publicclassMyClass{publicstaticvoidmain(Stringargs[]){if(args.length!=___)for(inti=0;i
A.4
B.5
C.6
D.7
查看答案
Part II Vocabulary and Structure Directions: In this part there are forty incomplete sentences. Each sentence is followed by four choices. Choose the one that best completes the sentence and then ma...
A.4
B.5
C.6
D.7
查看答案
How a Frenchman is reviving McDonald’s in Europe A. When Denis Hennequin took over as the European boss of McDonald’s in January 2004, the world’s biggest restaurant chain was showing signs of recov...
A.4
B.5
C.6
D.7
查看答案
设有下面的结构体和结构变量定义: struct car . '. { long id : char*name ; }; struct car carl ; 关于结构体类型变量赋值不正确的是()
A.4
B.5
C.6
D.7
查看答案
设有关于结构体类型的定义:() struct mankind { char name [ 20]; int age ; float weight : }person ,*p ; 下面各个供选项中语句都正确的有()
A.4
B.5
C.6
D.7
查看答案
在下面的一维数组定义中,哪一个有语法错误。
A.4
B.5
C.6
D.7
查看答案