dan*_*996 2 c arrays string replace char
我有以下 C 代码
#include <stdio.h>
int main(void){
char c[] = "ABC"
printf("%s ", c);
c[1] = 'B';
printf("%s", c);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我想要ABC BBC的输出是但我得到的输出是ABC ABC. 如何替换字符串/字符数组中的第一个字符?