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

how to generate the length of a string without using len
funtion?

Answer Posted / dattathreya

The below function should do it:

int strLength(char *s)
{
int i;
for(i = 0; s[i]; i++);
return i;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it fine to write void main () or main () in c?

968


What does %p mean?

1037


What is a program flowchart?

1126


What is %s and %d in c?

976


What is the use of sizeof () in c?

996


write a program to copy the string using switch case?

2846


Can stdout be forced to print somewhere other than the screen?

1017


Is null a keyword in c?

1140


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2718


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

1216


Why we use conio h in c?

1158


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1106


What is void main () in c?

1154


What are pragmas and what are they good for?

936


All technical questions

1923