Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- void izbaci(char* string, char* substring)
- {
- while(*string != '\0')
- {
- char* sub = substring;
- char* str = string;
- while(*sub != '\0' && *str == *sub)
- {
- sub++;
- str++;
- }
- if(isalpha(*sub)==0)
- {
- while(*str != '\0')
- {
- *string++=*str++;
- }
- *string = '\0';
- }
- string++;
- }
- }
- int main()
- {
- char s[]="izbaci ovuh test";
- izbaci(s, "ovu");
- puts(s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement