[单选题]

下列语句错误的是()。

A . char*p=“John”;p[2]=‘a’;

B . charname[5]=“John”;name[2]=’a’;

C . charname[5]=“John”,*p=name;p[2]=‘a’;

D . charname[5]=“John”,*p=&name[1];p[2]=‘a’;

参考答案与解析:

相关试题

下列语句哪些是错误的语句()

[多选题] 下列语句哪些是错误的语句()A . ConstImaxAsInteger=&o155B . Const_GaAsString="abc"C . Dimaa,bbAsInteger,ccAsStringD . yy=8,uu=9

  • 查看答案
  • 下列语句错误的是( )

    [试题]下列语句错误的是( )A.select * from orders where ordername is not null;B.select * from orders where ordernamenull;C.select * from orders where ordername is null;D.select * from orders where ordername not is null;

  • 查看答案
  • 下列语句错误的是()。

    [单选题]下列语句错误的是( )。A.char*p="John";P[2]='a';B.char name[5]="John";name[2]='a'C.char name[5]="John",*p=name;p[2]='a';D.char name[5]="John",*p=&name[2];*p='a';

  • 查看答案
  • 下列语句错误的是()。

    [单选题]下列语句错误的是( )。A.char*p="John";p[2]='a';B.char name[5]="John";name[2]='a'C.char name[5]="John",*p=name;p[2]='a';D.char name[5]="John",*p=&name[2];*p='a';

  • 查看答案
  • 下列语句错误的是

    [单选题]下列语句错误的是A.If a=3 And b=2 Then c=3 End IfB.If a=1 Then c=2 Else If a=2 End IfC.If a=3 And b=2 Then c=2 Else If a=2 Then c=3 End IfD.If a=1 Then c=2

  • 查看答案
  • 下列语句中有语法错误的语句是()。

    [单选题]下列语句中有语法错误的语句是()。A . MOVAX,[SI][DI]B . CMPBYTEPTR[BX],ALC . ADDBX,[BX]D . MOVCX,56H

  • 查看答案
  • 下列错误的定义语句是( )。

    [单选题]下列错误的定义语句是( )。A.int x[ ][3]={{0},{1},{1,2,3}};B.int x[4][3]={{1,2,3},{1,2,3},{1,2,3},{1,2,3}};C.int x[4][ ]={{1,2,3},{1,2,3},{1,2,3},{1,2,3}};D.int x[ ][3]={1,2,3,4};

  • 查看答案
  • 下列语句中,错误的是

    [单选题]下列语句中,错误的是A.const int buffer=256;B.const double *point;C.int const buffer=256;D.double * const point;

  • 查看答案
  • 下列语句中错误的是( )。

    [单选题]下列语句中错误的是( )。A.const int a;B.const int a=10;C.const int*point=0;D.const int*point=new int(10);

  • 查看答案
  • 下列语句中错误的是

    [单选题]下列语句中错误的是A.String s[]={"how","are"};B.byte b=255;C.String s="one"+"two";D.int i=2+2000;

  • 查看答案
  • 下列语句错误的是()。