Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main(){
- char a[] = "hello world";
- char c[2000];
- strcpy(c,a);
- char b[] = "o";
- int i = 0;
- while(a[i]!='\0') {
- if(a[i]==b[0]) {
- a[i] = ' ';
- }
- ++i;
- }
- for(int i = 0; a[i] != '\0'; i++) {
- if(a[i]==' ' && c[i]!= ' ') {
- }
- else {
- printf("%c", a[i]);
- }
- }
- // printf(a);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement