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

please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

2129


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

1049


How can I do serial ("comm") port I/O?

1129


What is identifiers in c with examples?

1116


What is the difference between array and pointer?

964


How is actual parameter different from the formal parameter?

973


What does %d do?

1203


What are structures and unions? State differencves between them.

1096


What is the benefit of using #define to declare a constant?

1042


what is a function method?give example?

2309


Is there any demerits of using pointer?

1011


What is the difference between #include and #include 'file' ?

998


When should the const modifier be used?

1058


c language interview questions & answer

1895


Write a program to identify if a given binary tree is balanced or not.

1089