C program for removing specified charecter , C/C++ Programming

 

#include stdio.h>

#include conio.h>

#include string.h>

 

void del(char[],char *);

main()

{

          char str[30],ch,*pp;

          clrscr();

          puts("ENTER THE STRING: ");

          gets(str);

          printf("ENTER ANY CHARACER WHICH U WNAT TO DELETE: ");

          ch=getchar();

          pp=&ch;

          del(str,pp);

          getch();

}

 

void del(char c[],char *pp)

{

          int l,i;

          l=strlen(c);

          for(i=0;i

          {

                   if(c[i]==*pp)

                             c[i]=' ';

                   else

                             printf("%c",c[i]);

          }

}

 

Posted Date: 9/10/2012 8:24:38 AM | Location : United States







Related Discussions:- C program for removing specified charecter , Assignment Help, Ask Question on C program for removing specified charecter , Get Answer, Expert's Help, C program for removing specified charecter Discussions

Write discussion on C program for removing specified charecter
Your posts are moderated
Related Questions
padovan string for a natural number is defined

Program to design list in c: Write a program in c to insert the values in list void main() { int i=0; char a[20]; clrscr(); printf("Enter the line\n");

What are Arrays? Numerous applications require the processing of multiple data items that have identical characteristics. In such circumstances it is frequently convenient to p

B-tree: A B-tree is an also called balanced m-way tree. A node of the tree may have many records or key and pointers to children. It is also called as the balanced sort tree. It s

#questio#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string

Overloading Binary Operators class SI {float i,p,n,r,a; public: SI(){}; SI(int gp,int gn, int gr); void putdata(void); SI operator+(SI); }; SI SI::opera

need to create c++ classes to store all pascal types in compiler design.

string will contain only lower case alphabet& the ascii value starts from 1-26,(ie,a=1&z=26).it perform the operation like the following costs:add=2units,replace=1unit,delete=3unit

Linear search in array - C program: Write a program in c to define a linear search in array. void main()                 {                 clrscr();

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome