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

I have completed my B.E with (CSE) computer science and engineering ,i had a total no of backlogs=20 ,is there any chances to get the visa PLEASE HELP ME NE1 : MY ID=john_searchig143@yahoo.com .

1816


WHAT IS DIFFERENT BETWEEN YOU AND OTHER APPLICANT TO GIVE YOU THE JOB

2086


What are the main differences between the engines in jet fighters and the engines in jet airliners; which type of engine is the more efficient, and (qualitatively) why?

1152


funtionalities of loadining and linking

2004


what is the stucture of.net array?

2055


difference between a for loop and a while loop? what are its uses in c language?

2255


which topics are come from quizs

1562


How Main()is called by opreting system?

2018


is it possible to get u.s visa with 55% in b-tech and 15 backlogs

1933


What is the instruction to load the register B?

2288


What will be the sql query to list the employee names those are getting 3rd highest salary ?

1746


Calculate the interstage pressure ratio per stage for a two stage compressor if the overall pressure ratio is 10.

1984


how to join two table those stored on different database.

1882


plz send me interview questions & answers of Data Structure

2001


AD backups and restoration

1998