string替换指定字符串 用C语言编写程序,将字符数组中的指定字符替换为另一个字符?

用C语言编写程序,将字符数组中的指定字符替换为另一个字符?1. 打开visualc6.0-file-New-file-C源文件。2. 定义变量:#include3。输入字符:printf(“Input

用C语言编写程序,将字符数组中的指定字符替换为另一个字符?

1. 打开visualc6.0-file-New-file-C源文件。

2. 定义变量:#include

3。输入字符:printf(“Input a character,use getche function to receive n”)/*提示用户输入字符*/C1=getche()/*use getche()function to receive*,printf(“n”)/*输出空行*/。

4. 输入字符:printf(“Input a character,use getch function to receiven”)/*提示用户输入字符*/,C2=getch()/*use getch()function to receive*/,printf(“n”)/*输出空行*/。

5. 输入字符。

6. 输出最终结果。

求C语言替换字符串中某个字符的函数?

#包含“stdio。H“#include”字符串。H “void swap(char s[100],char a,char b)/*a是要替换的原始字符,b是替换的字符*/{int i for(i=0I)