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

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();

}

 

Posted Date: 9/10/2012 7:35:28 AM | Location : United States







Related Discussions:- C program for removing char which u want, Assignment Help, Ask Question on C program for removing char which u want, Get Answer, Expert's Help, C program for removing char which u want Discussions

Write discussion on C program for removing char which u want
Your posts are moderated
Related Questions




A body which has three forces acting on it is in equilibrium. One force is 3N to the North and the other is 4N to the west. What us the magnitude and direction of the third force?

A: In C, encapsulation was completed by making things static in a compilation unit or module. It prevented another module from accessing the static stuff. (Incidentally, now static

What is a hash function? Hash function: This is the method from the set 'K' of keys into the set 'L' of memory addresses.   H: K → L These are used to verify the address

Project Description: Seeking a Voting Bot Script / Program Skills required are ASP, Javascript, C Programming, PHP, Software Architecture

how to make basics strong and best logic skills what are the best way to be a expert programmer ? what counts a lot knowledge or practice?

Define Register Storage Class - computer programming? The Storage class register notify the compiler that the associated variables must be stored in high-speed memory register.