Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Program to trim a given character from a string.

Answer Posted / dj

#include<iostream>
using namespace std;
#include<string.h>
int main()
{
char string[]="lhellolollla";
int i=0;
int count=0;
while(i<strlen(string))
{
while(string[i+count]=='l')
count++;
string[i]=string[i+count];
i++;

}
printf("%s",string);
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a void * in c?

1072


Explain how can you check to see whether a symbol is defined?

1168


Which is the best website to learn c programming?

1075


regarding pointers concept

2034


How to Throw some light on the splay trees?

1058


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2689


What do you mean by recursion in c?

1102


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

2314


How can I invoke another program or command and trap its output?

1093


Is this program statement valid? INT = 10.50;

1140


How do you print only part of a string?

1015


Explain what is the difference between a free-standing and a hosted environment?

1182


Where can I get an ansi-compatible lint?

1143


When should a far pointer be used?

1119


Is c easy to learn?

976