下面语句的输出结果( )。<?php$str1="I am student ";$str2="Lily";$str3=str_replace("student",$str2,$str1)echo $str3;?>
A: I am student
B: I am Lily
C: Lily am student
D: I am student Lily
A: I am student
B: I am Lily
C: Lily am student
D: I am student Lily
举一反三
- 对于用字符数组和字符指针变量处理字符串,下列定义的语句,错误的是()。 A: char str[20]; str ="I am student”; B: char *str;str =“I am studen”; C: char str[20] =“I am studen”; D: char *str = {“I am studen”};
- 以下错误的字符数组的赋值方式是【 】。 A: char string[]="I am a student."; B: char *p="I am a student"; C: char str[20]; str="I am a student."; D: char str[20];strcpy( str,"I am a student.") ;
- 下列字符串赋值方式不正确的是( ) A: char str[20]; B: char *str ;str=”I am a boy!”; str=”I am a boy!”; C: char *str=”I am a boy!”; D: char str[20]=” I am a boy!”;
- 19.下列字符串赋值方式不正确的是 A: char str[20]; str=”I am a boy!”; B: char *str ; str=”I am a boy!”; C: char *str=”I am a boy!”; D: char str[20]=” I am a boy!”;
- 下列字符串赋值方式不正确的是( ) A: A.char str[20]; str="I am a boy!"; B: B.char *str; str="I am a boy!"; C: C.char *str="I am a boy!"; D: D.char str[20]=" I am a boy!";