使用c将子字符串替换为另一个子字符串 [英] Replace a substring with another substring using c

查看:246
本文介绍了使用c将子字符串替换为另一个子字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想替换给定字符串中的单词


e。 g


string ----他是一个好人。


在上面的字符串我想要替换好的带有温柔的词所以最后


i想打印下面的字符串: -


他是一个温柔的男人。


plz在不使用字符串函数的情况下给出c程序代码。

i want to replace a word in given string

e. g

string ---- He is a good man.

in above string i want to replace "good" word with "gentle" so finally

i want to print bellow string :-

He is a gentle man.

plz give c program code without using string function.

推荐答案

请阅读发布指南。我们不会做你的功课,勺子用代码喂你。阅读一些教程,尝试代码并发布如果你的你的代码有问题。
Please read the posting guidelines. We won''t do your homework and spoon feed you with code. Read some tutorials, try the code and post if you have problems with your code.


你做了什么来给出答案?


首先,你搜索了句子找到了这个词。

然后,如果你找到了这个词,那么当你再次写句子而不是写下它时在那里你写了新单词。
What did you did to give the answer in writing??

First, you searched the sentence to find the word.
Then, if you found the word, then when you were writing the sentence again instead of writing the word it is there you wrote the new word.
展开 | 选择 | Wrap | 行号


先生

i已经阅读了你的答案,但是如果可能,我想要完整的c程序。


i尝试了更多,但失败了。


plz向我发送完整的c程序而不使用字符串函数。


谢谢你


来自

abc
sir
i have read your answer, but i want the complete c program if it is possible.

i have tryed more, but failed.

plz send me complete c program without use of string functions.

thank u

from
abc


这篇关于使用c将子字符串替换为另一个子字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆