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...

to write a program to search a character in a string and to
print till the character in the string using pointers in c
program

Answer Posted / guest

char str[20]="some string";
char *ptr=str;
char search_char=e;
for(int t=0;i<strlen(str);i++)
{
if((*ptr)==e) (*ptr)=\0' //null charachter
}
printf("%s",str);

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many VLANs are supported on a single switch

1871


how many protocols are available and what are they?

2311


can i get some win vista notes

1677


i want a richdatatable to be displayed only when a list has some value in the bean, and a datatable with header only if the list is empty. And i want the datatable to be printed only when ajax button is clicked??

1868


how many E1's in pasolink and ipasolink?

1762


write a c program which accepts input as Anu.B.Kapoor and gives output as:Kapoor.A.B plz send me the ans

1631


A rectangular beam section of 300 mm width and 500 mm effective depth is reinforced with 4 bars of 20 mm diameter, what shear reinforcement is required to resist 200 kN shear (use working stress method)?

1964


What is the purpose of dampening roller

1670


what is static identifier in c language?

2131


which/why unix commands are simpler rather than complex tasks

2460


how to reuse an outdated laptop?

1943


Briefly describe your ideal job?

3743


what is buffer solution?

2238


boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName);

2075


hi to all,i done ccna,now im looking job,but it is very diffcult to get job in networking field,.........i dnt know what im doing wrongly,kindly help me and give the proper way...i have so much of interest in this field only

1861