Sunday, July 22, 2012

Program which will read a line and delete from it all occurrences of the word “that”

10:33 AM

#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();
}

Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 comments:

Post a Comment

 

© 2013 TechSansar. All rights resevered. Designed by Templateism

Back To Top