How do I remove a character from a string?
If I have It is easy to remove the first character with this code: and will give me the string without the last character, but I still did not know how the middle string Can control overlapping regions, I try to do something (not tested, maybe + -1 issue) "abcdef" string and how do I remove
"b" ?
#include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; #include & lt; String.h & gt; Int main () {char word [] = "abcdef"; Four words 2 [10]; Strcpy (WORD2, & amp; [1]); Printf ("% s \ n", word 2); Return 0; }
strncpy (word 2, word, strollon (word) -1);
Comments
Post a Comment