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
Suppose we use Lists to represent a movie which has a title, cast and year. For example, the following list represents the movie, "Die Hardly", with the cast "Bruce Willing" and "T

1. Jewels can only be removed for polishing from either end of the necklace (i.e. head or tail) 2. Once a jewel type is removed from the necklace, all other instances of the same j

a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits of a and b.

Literals (Constants) Constants are data storage locations whose address is not accessible for the user. Their value is not altered during the course of the program. Literal

The task consists of two parts which are both preferably implemented in one source file. Towards the end of this document you will find a code skeleton that you must assume. Start

Respected Sir, I want the above written text in a C program

c program to count the number of occurances of the string in padovan''s string

Question 1: (a) Describe the following objects and condition states: (i) ifstream and ofstream objects (ii) eof(), fail(), bad() and good() functions. (b) Write a C++ pr

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

1. The management of a company would like to determine the median annual salary of its employees.Write a pascal program that display the number of employees and their median salary