niusouti.com
更多“若有两个字符串str 1="98765",str2="65",执行s=Instr(str1,str2)后,返回 ( )。A.3B.4C.5D.6 ”相关问题
  • 第1题:

    字符串函数strcat(str1,str2)的作用是将字符串str2连接在字符串str1后.


    正确

  • 第2题:

    字符串函数strcat(str1,str2)的作用是将字符串str2连接在字符串str1后。


    正确

  • 第3题:

    若有定义:char strl[10],str2[ ]="student"; 以下能把str2中的字符串赋给strl的语句是()。

    A.for(int i=0; i<=strlen(str2); i++) str1[ i ]=str2[ i ];

    B.str1="student";

    C.str1=str2;

    D.for(int i=0; str2[ i ]!=0; i++) str1[ i ]=str2[ i ];


    D

  • 第4题:

    若有语句;char str1[8],str2[8]={"hello!"}; 则能将字符串hello!赋给str1的正确语句是_____

    A.str1=str2

    B.strcpy(str1,str2)

    C.str1==str2

    D.strcpy(str2,str1)


    ’/0’

  • 第5题:

    若有定义:char strl[20]="a good ", str2[ ]="student"; 以下能将字符串str1变为"a good student"的语句是()。

    A.strcat(str1, str2);

    B.strcpy(str1, str2);

    C.str1 = str1 + str2;

    D.str1 = str1 & str2;


    8,16,10