#include<stdio.h>
#include<conio.h>
void main()
{
char str[]=”I that love c that programming.”;
int i;
clrscr();
for(i=0;str[i]!=’\0′;i++)
{
if(str[i]==116&&str[i+1]==104&&str[i+2]==97&&str[i+3]==116&&str[i+4]==32)
{
for(;str[i+5]!=’\0′;i++)
str[i]=str[i+5];
str[i]=’\0′;
i=0;
}
}
printf(“%s”,str);
getch();
}
#include<conio.h>
void main()
{
char str[]=”I that love c that programming.”;
int i;
clrscr();
for(i=0;str[i]!=’\0′;i++)
{
if(str[i]==116&&str[i+1]==104&&str[i+2]==97&&str[i+3]==116&&str[i+4]==32)
{
for(;str[i+5]!=’\0′;i++)
str[i]=str[i+5];
str[i]=’\0′;
i=0;
}
}
printf(“%s”,str);
getch();
}
0 comments:
Post a Comment