C program for removing char which u want, C/C++ Programming

Assignment Help:

C Program for REMOVING CHAR WHICH U WANT

void main()

{

          int i,j;

          char a[100],r;

          clrscr();

          for(i=0;i<100;i++)

                   a[i]=0;

          i=0;

          printf("\N ENTER THE STRING: ");

          do{

                   a[i++]=getchar();

          }while(a[i-1]!='\n');

          a[i]='\0';

          printf("\N ENTER THE CHAR U WANT TO REMOVE? ");

          scanf("%c",&r);

          for(i=0;a[i]!='\0';i++)

          {

                   if (a[i]==r)

                   {

                             a[i]=a[i+1];

                             i++;

                   }

          } a[i]='\0';

          puts(a);        getch();

}

 


Related Discussions:- C program for removing char which u want

Explain about the unions, Explain what are Unions? The Unions like as s...

Explain what are Unions? The Unions like as structures, contain members whose individual data types may perhaps differ from one another. Though the members that create a union

Addition in a existing c++ unification algorithm, Addition in a existing c+...

Addition in a existing c++ unification algorithm Project Description: I have a existing code for a algorithm and need to add two modules into it, it is a unification algorith

Problem : Compiler Design - Limit the methods, Rahul is a newbie to the pro...

Rahul is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''{'' and end with '

Chelo, need some help with finishing a program

need some help with finishing a program

Program to add 2 distances & show sum as new distance, THIS PROGRAM IS TO A...

THIS PROGRAM IS TO ADD TWO DISTANCES & SHOW THEIR SUM AS NEW DISTANCE # include # include typedef int dist; struct distance   {   dist inch;   dist feet;   }; distance add

Board coloring, color representation 0,1,2,3,4,5,6,7...

color representation 0,1,2,3,4,5,6,7...

C++, 2. Write C++ code for calculating the time table

2. Write C++ code for calculating the time table

#psuedocode, Create a pseudocode in getting Calendar Quarter. The program s...

Create a pseudocode in getting Calendar Quarter. The program should identify which quarter falls the given date. Note: Consider the date format DDMMYYYY.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd