【单选题】【消耗次数:1】
设有如下函数定义 int f(char *s) { char *p=s; while(*p!=’\0’) p++; return(p-s); } 在主函数中用coutf(“good”)调用上述函数, 则输出结果为( )。
3
4
5
6
参考答案:
复制
纠错
相关题目
【单选题】 设有如下函数定义 int f(char *s) { char *p=s; while(*p!=’\0’) p++; return(p-s); } 在主函数中用coutf(“good”)调用上述函数, 则输出结果为( )
①  3
②  4
③  5
④  6
【单选题】 设有如下函数定义 int f(char *s) { char *p=s; while(*p!=’\0’) p++; return(p-s); } 在主函数中用cout<<f(“good”)调用上述函数, 则输出结果为( )。
①  3
②  4
③  5
④  6
【单选题】 设有如下函数定义 int f(char *s) { char *p=s; while(*p!=’\0’) p++; return(p-s); } 在主函数中用cout<<f(“good”)调用上述函数, 则输出结果为( )
①  3
②  4
③  5
④  6
【单选题】 以下函数的返回结果是() int function(char *x) { char *p=x; while(*p++); return(p-x-1); }
①  求字符串的长度
②  将字符串x连接到字符串p后面
③  将字符串x复制到字符串p中
④  将字符串x反向存放
【单选题】 以下函数的返回结果是(????) int function(char *x) { char *p=x; while(*p++); return(p-x-1); }
①  求字符串的长度
②  将字符串x连接到字符串p后面
③  将字符串x复制到字符串p中
④  将字符串x反向存放
【单选题】 以下函数的返回结果是( )。 int function(char *x) { char *p=x; while(*p++); return(p-x-1); }
①  求字符串的长度B.将字符串x连接到字符串p后面
②  将字符串x复制到字符串p中
③  将字符串x反向存放
【单选题】 以下函数的返回结果是( )。 int function(char *x) { char *p=x; while(*p++); return(p-x-1); }
①  求字符串的长度B.将字符串x连接到字符串p后面
②  将字符串x复制到字符串p中
③  将字符串x反向存放
【单选题】 程序段char a[ ]=“English”; char *p=a; int n=0;while( *p!=‘\0’){ n++; P++;}结果中,P指向( )。
①  A. 字符h
②  B.a
③  C. 字符串的结束符
④  D.7
【单选题】 程序段char a[ ]=“English”; char *p=a; int n=0; while( *p!=‘\0’){ n++; p++;} 结果中,n的值是( )。
①  A. 6
②  B.8
③  C.5
④  D.7
【单选题】 已定义以下函数 fun(int*p) {return*p;} 该函数的返回值是()
①  不确定的值
②  形参p中存放的值
③  形参p所指存储单元中的值
④  形参p的地址值
随机题目
【单选题】 These are your clothes. Put [填空] in the wardrobe,please.
①  it
②  them
③  they
④  its
【单选题】 Please put the milk [填空] the bottle.
①  into
②  on
③  for
④  in
【单选题】 There is [填空] man over there. [填空] man is Lilys uncle.
①  the,The;
②  an,The
③  a,The
④  a,an
【单选题】 How [填空] rice do you need?
①  much
②  many
③  long
④  about
【单选题】 What about [填空] shopping ?
①  go
②  goes
③  going
④  go to
【单选题】 Granny?suddenly?returned [填空]?night.
①  on
②  at
③  ?in
④  during
【单选题】 This is [填空] apple.Its [填空] bad apple.
①  an,a
②  a,the
③  a,an
④  an,the
【单选题】 My uncle bought a new bike for [填空].
①  theirs
②  they
③  me
④  I
【单选题】 Is he [填空] Italian boy ?
①  an
②  a
③  one
④  /
【单选题】 What’s [填空] the box?
①  in
②  on
③  at
④  for