单项选择题

以下能正确定义一维数组的选项是()。

A、int a[5] =0,1,2,3,4,5;
B、char a[ ] = 0,1,2,3,4,5;
C、char a = 'A','B','C ';
D、int a[5] = "0123";

<上一题 目录 下一题>
热门 试题

单项选择题
有以下定义和语句: struct workers int num; char name[20]; char c; struct int day; int month; int year; s; ; struct workers w, *pw; pw=&w; 能给w中year成员赋值1980的语句是()

A、 *pw.year=1980;
B、w.year=1980;
C、pw->year=1980;
D、w.s.year=1980;

单项选择题
以下程序(程序左边的数字为附加的行号)()。1#include<str.h>2#include<stdio.h>3main()4 char s[]= string ;5puts(s);6strcpy(s, hello );7printf( %3s n s);

A、没有错
B、第1行有错
C、第6行有错
D、第7行有错

相关试题
  • 以下程序运行后的输出结果是______。...
  • 下列程序的输出结果是______。 #in...
  • 以下程序运行后的输出结果是______。...
  • 设int a=5,b=6,表达式(++a==b...
  • 定义int a=5,b;,则执行表达式b=++...