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

Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1112


Disadvantages of C language.

1063


Which is best linux os?

984


Explain built-in function?

1103


How can you tell whether a program was compiled using c versus c++?

1060


What are the features of c language?

1033


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

3146


Is it better to bitshift a value than to multiply by 2?

1064


What is spark map function?

1071


Can a local variable be volatile in c?

963


What is a stream in c programming?

1102


How do you define structure?

1006


Explain void pointer?

991


Explain how do you use a pointer to a function?

1068


Can you think of a logic behind the game minesweeper.

2428