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
Ques.Implement a c/c++ program to find a shortest path between two nodes in a network?network should be taken as an adjacency matrix.

What is the difference among a copy constructor and an overloaded assignment operator? Ans) A copy constructor constructs a latest object by using the content of the argument

THIS PROGRAM IS TO ASK A DATE & ALSO ASK FOR DAYS TO BE ADDED TO PRODUCE #include #include struct date  {   int dd;   int yy;   int mm;  }; void main()  {  clrscr();  in


find area uder the curve y=f(x) between x=a and x=b   #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; in

print this pattern 1 01 101 0101

Can I explicitly call a destructor if I've allocated my object with new?

Write a program in C that you will name "divide.exe", to divide one 32-bit twos-complement binary number by another, giving the quotient and the remainder, using the subtract-shift

Write a Program that illustrate union declaration? A C program encloses the following union declaration: union id { char color[12]; int size; } shirt, blouse; At this

what is the function of spanning tree in graph algorithm?