- assumes that the string has a maximum length of 4k after replacement
- doesn't address the case of several occurences of the string
- the result is a pointer to a static location: not to be used in multithreaded environment, and needs to copy the result if you call the function several times.
- obscure programming of the test
Yuck
HiMahesh September 27, 2011 at 7:44 PM
Very Useful tips
How to replace string more than once appears ?luqman November 16, 2011 at 7:57 PM
I try code above, but that's just replace one pattern. If any other patern occure, that will not replace it.....
c sudhira June 8, 2012 at 5:53 PM
write a c program to change the every word "ramesh "into "manesh"......
This will fail in some casesSudher December 19, 2012 at 5:20 PM
If input is "hello world this is world", "world", "india" then only first 'world' will be replaced
Poor programmingMike November 30, 2012 at 8:47 PM
- assumes that the string has a maximum length of 4k after replacement - doesn't address the case of several occurences of the string - the result is a pointer to a static location: not to be used in multithreaded environment, and needs to copy the result if you call the function several times. - obscure programming of the test Yuck
Post your Comment