char s[80], *sp = HELLO!”; sp = strcpy(s, sp); s[0] = ‘h’; puts(sp);
举一反三
- 下列程序运行时的输出结果是 。#include[stdio.h]#include[string.h]int main(){ char s[80],*sp="hello!"; sp=strcpy(s,sp); s[0]='H'; puts(sp); return 0;}
- 下面程序段的运行结果是( )。chars[80],*sp="HELLO!";sp=strcpy(s,sp);s[0]='h';puts(sp);
- char s[80],*sp="HELLO!";sp=strcpy(s,sp);s[0]='h';puts(sp);运行结果:________
- 以下程序的输出结果是______ 。#include #include int main(void) { char s[10], sp[] = "HELLO"; strcpy(s, sp); s[0] = 'h'; s[6] = '!'; printf("%s\n", s); return 0;}
- 下面程序段的输出结果为( )。char s[20]="Hello!",*sp=s;s[2]='\0';puts(sp);