write a program to remove occurrences the word from entered
text?
Answer / jitendra
#include"stdio.h"
#define n 100
void del_char(char str1[n],char str2[])
{
char str[n],*p1,*q,i,j;
p1=str1;
q=str;
*q=*p1;
i=0;
while(*p1!='\0')
{
{
if(*p1==str2[i])
{
p1++;
i++;
if(*p1==str2[i])
{
p1++;
i++;
if(*p1==str2[i])
{
p1++;
i++;
}
else
{
q++;
}
}
else
{
q++;
}
}
else
{
p1++;
q++;
}
*q=*p1;
}
i=0;
}
printf("%s\n",str);
}
main()
{
char str1[n],str2[]={"to "};
printf("please enter a text and includ 'to':\n");
gets(str1);
printf("remove 'to',remaining :\n");
del_char(str1,str2);
getch();}
| Is This Answer Correct ? | 5 Yes | 7 No |
Can you explain the four storage classes in C?
what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
What does the error 'Null Pointer Assignment' mean and what causes this error?
a C prog to swap 2 no.s without using variables just an array?
what are enumerations in C
What is c definition?
There is a mobile keypad with numbers 0-9 and alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.
please give me answer with details #include<stdio.h> main() { int i=1; i=(++i)*(++i)*(++i); printf("%d",i); getch(); }
What are high level languages like C and FORTRAN also known as?
Program to find the absolute value of given integer using Conditional Operators
program that accepts amount in figures and print that in words
2 Answers Infosys, Lovely Professional University, Wipro,