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

Wap to print numbers from 1-50 which are divided by 7, WAP TO PRINT NUMBERS...

WAP TO PRINT NUMBERS FROM 1-50 WHICH ARE DIVIDED BY 7 void main () { int a; clrscr (); a=1; while (a { if (a%7==0) printf ("%d\n",a); a++; } ge

Program to calculate the average sales for each employee , There are 2...

There are 25 employees in a business. Each employee has 5 sales each day of the month (Assume there are 30 days in each month of the year). Draw a flowchart for a pr

Compass bearing, write a c program that converts compass bearings into dire...

write a c program that converts compass bearings into direction

Program to implement a ftp client, Write a program in C to implement a FTP ...

Write a program in C to implement a FTP client that can interoperate with a default FTP server . The client should implement basic FTP commands GET PUT LIST DELE . GET -> to

Link list, For this program you will add and test 2 new member functions to...

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t

Computer Science Engineering C++ Homework, Temperature Conversions. Problem...

Temperature Conversions. Problems 28 through30generate temperature-conversion tables. Use the following equations that give relationships between temperatures in degrees Fahrenheit

Memory management operator, Memory Management Operator In C malloc( ), ...

Memory Management Operator In C malloc( ), calloc( ), realloc( ), and free( ) are used to mange dynamic memory.  In addition to these function C++ have derived two unary ope

Word counting, Task Your task is to write a program, words, that reports i...

Task Your task is to write a program, words, that reports information about the number of words read from its standard input. For example, if the file qbf.txtcontains the text th

D, drawbacks in assignments in engeenirng

drawbacks in assignments in engeenirng

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