【单选题】【消耗次数:1】
以下对一维整型数组a的正确说明是( )。
int a(10);
int n=10,a[n];
int
#define SIZE scanf (%, int a[SIZE]; int a[n];
参考答案:
复制
纠错
相关题目
【单选题】 有说明语句int a[10];及函数int fun(int x[10],int n){return sizeof(x);},则语句cout<<fun(a,10)<<endl;的显示结果是()
①  40
②  10
③  4
④  0
【单选题】 有说明语句int *p=new int[10];访问动态数组元素的正确语句是()
①  int a=p;
②  int a=*p;
③  delete int[]p
④  delete p int[10]
【单选题】 有说明语句int b[4][5];void fun(int*,int n);调用函数的正确语句是()
①  fun(b,20);
②  fun(b[0],20);
③  fun(b[0][0],20);
④  fun(b,20);
【多选题】 如果输入的是5,以下程序运行结果不正确的是() #include #define M n+n void main( ) { int n; int result; printf(请输入一个整数:); scanf(%d, result=M*M; printf(result = %d\n,result); }
①  100
②  35
③  25
④  50
【单选题】 若有说明class Y{//…;public:staticint n;};int Y::n;Y objY;,则对n的正确访问语句是()
①  n=1;
②  Y::n=1;
③  objY::n=1;
④  Y-n;
【单选题】 若有说明:int a[10];,则对a数组元素的正确引用是(  )。
①  a[10]
②  a[3.5]
③  a(5)
④  a[10-10]
【单选题】 若有说明:int a[10];则对a数组元素的正确引用是( )。
①  a[10]
②  a[3.5]
③  a[5]
④  a[10-10]
【单选题】 若有说明:int n=2,*p=&n,*q=p,则以下非法的赋值语句是:()
①  p=q
②  *p=*q
③  n=*q
④  p=n
【单选题】 下面程序的输出是 int fun3(int x) {static int a=3; a+=x; return(a); } void main() {int k=2,m=1,n; n=fun3(k); n=fun3(m); printf(%d\n }
①  3
②  4
③  6
④  9
【单选题】 执行完以下代码int [ ] x = new int[10];后,以下哪项说明是正确的( )
①  x[9]为0
②  x[9]未定义
③  x[10]为0
④  x[0]为空
【单选题】 下面程序的输出结果是()。 #include int num=10; func( ) {int num=4; return ++num; } void main( ) { printf(%d\n, func( ) ) ; }
①  4
②  5
③  10
④  11
随机题目
【单选题】 In Grandmother said Dad was a devoted son all his life, the writers attitude is [].
①  positive
②  negative
【单选题】 Larrys friends describe him as a man of being [] and upright.
①  responsible
②  responsibility
【单选题】 Kirsten is the mother of her students. Here mother takes the [] meaning.
①  denotative
②  connotative
【单选题】 In Gloria was tall and slender. the writers attitude is [].
①  positive
②  negative
【单选题】 The Shining star wore a(n) [].
①  Victorian gorgeous evening dress
②  gorgeous Victorian evening dress
【单选题】 Social [] vary greatly from country to country.
①  customs
②  habits
【单选题】 The appreciative word is[].
①  cocky
②  proud
③  arrogant
④  self-confident
【单选题】 Our universtiy can [] 4000 students.
①  accommodate
②  contain
【单选题】 He was the Emperor of the Berlin Olympics in 1936. here emperor takes the [] meaning.
①  denotative
②  connotative
【单选题】 The pejorative word is [].
①  updated
②  new
③  newfangled