69,371
社区成员
发帖
与我相关
我的任务
分享
#include<stdio.h>
#include<string.h>
int main()
{
//char *c = "im the best"; //c指向一常量,不可对常量修改
char c[] = "im the best"; //等价于 c[12]={'i','m',' ','t','h','e',' ','b','e','s','t','\0'};
char *fynd = strstr(c, "b");
printf("%s\n", c);
*fynd = '6';
printf("%s\n", c);
printf("%s\n", fynd);
return 0;
}
//im the best
//im the 6est
//6best
char c[]="im the best";