若有char ch[10],则下列字符串数组的赋值中不正确的是( )。
A: ch="welcome";
B: ch[0]='w';
C: strcpy(ch,"welcome");
D: char ch1[]="welcome";strcpy(ch,ch1);
A: ch="welcome";
B: ch[0]='w';
C: strcpy(ch,"welcome");
D: char ch1[]="welcome";strcpy(ch,ch1);
举一反三
- 假设已定义char ch[20],*str=ch; 下列哪条语句不正确_______________________。 A: str="teacher"; B: ch="teacher"; C: strcpy(ch, "teacher"); D: strcpy(str,"teacher");
- 判断char型变量ch是否为大写字母的正确表达式是()A.‘A’[=ch<=‘Z’ B.(ch]=‘A’)&(ch[=‘Z’) C.(ch]=‘A’)&&(ch[=‘Z’) D.(‘A’<= ch)AND(‘Z’]= ch) A: ‘A’<=ch<=‘Z’ B: (ch>=‘A’)&(ch<=‘Z’) C: (ch>=‘A’)&&(ch<=‘Z’) D: (‘A’<= ch)AND(‘Z’>= ch)
- 假设已定义char ch[20],*str=ch; 下列哪条语句不正确_______________________。 A: str="teacher"; B: ch="teacher"; C: strcpy(ch, "teacher"); D: strcpy(str,"teacher");
- 若有char ch=A则表达式ch=(ch>=A
- 中国大学MOOC: 有说明:char ch[20] ,*str=ch ; 则语句ch=teacher ; 能实现将字符串teacher赋值到ch数组