单项选择题

以下程序段中,不能正确赋字符串(编译时系统会提示错误)的是______。

A.char s[10]="abcdefg";
B.char t[]="abcdefg", * s=t;
C.char s[10]; s="abcdefg";
D.char s[10]; strcpy(s, "abcdefg");
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: main() int m[][3]=1, 4, 7, 2, 5, 8, 3, 6, 9); int i, j, k=2; for(i=0; i<3; i++) printf( % d , m[k][i]); 执行后输出结果是______。
A.456
B.258
C.369
D.789
单项选择题
以下叙述中正确的是______。
A.全局变量的作用域一定比局部变量的作用域范围大
B.静态(stati
C.类别变量的生存期贯穿于整个程序的运行期间C) 函数的形参都属于全局变量
D.未在定义语句中赋初值的auto变量和static变量的初值都是随机值
相关试题
  • 以下程序中函数reverse的功能是对a所指数组...
  • 有以下程序: struct STU char name[...
  • 以下程序的输出结果是______。 char...
  • 有以下程序: void sott(int a[], ...
  • 以下程序中函数sort的功能是对a所指数组中...