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

what is the difference between a decision statement and ea loop statement?

2441


1)How to calculate AC Capacity for the Room?

2302


to which generation of prog. languages does ai prog languages belong

2402


How to select the total numbers of fire extinguisher installed in a room ?

2410


What is the main difference between binary and counting semaphore?

2455


What is the aim of Value Engineering?

1244


operation of carrier aided protection and what is the basis for choice of frequncy in powerline carrier system

6425


what is the difference betweeen far pointer and near pointer

2321


plz send me how to overhauling of freon bitzer semi receprocal comprassors with available video

1930


I have Job A and Job B in jcl. I want to trigger Job B from Job A. Please advise.

2039


Index of an Array containing 'n' aliment varies from________to_______

2078


how to prepare for an written exam for any type of company?

2457


WHAT ARE THE ADVANTAGE OF SYSTEM ENGINEER

1966


can u give me the information about the questions asked by the bally in campus

1926


different types of protocols.......?

1936