赞题库-背景图
单项选择题

以下选项中,合法的是______。

A.char str3[]={"d", "e", "b", "u", "g", "\0"};
B.char str4; str4="hello world";
C.char name[10]; name="china";
D.char str1[5]="pass", str2[6]; str2=str1;
<上一题 目录 下一题>
热门试题

单项选择题以下叙述中错误的是______。

A.函数的返回值类型不能是结构体类型,只能是简单类型
B.函数可以返回指向结构体变量的指针
C.可以通过指向结构体变量的指针访问所指结构体变量的任何成员
D.只要类型相同,结构体变量之间可以整体赋值

单项选择题有以下程序:#include<stdio.h>#define N 3void fun(int a[][N], int b[]){ int i, j; for(i=0; i<N; i++){b[i]=a[i][0]; for(j=i; j<N; j++)if(b[i]<a[i][j]) b[i]=a[i][j]; }}main(){int x[N][N]={1, 2, 3, 4, 5, 6, 7, 8, 9}, y[N], i; fun(x, y); for(i=0; i<N; i++) printf( %d, , y[i]); printf( n ); }程序运行后的输出结果是______。

A.2,4,8,
B.3,6,9,
C.3,5,7,
D.1,3,5,