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 / poornima

#include<stdio.h>
int strlength(char *);
int main()
{
char *str;
int len;
printf("Enter a string : ");
gets(str);
len=strlength(str);
printf("Length of %s is %d",str,len);
return 0;
}
int strlength(char *str)
{
int len=0;
for(;*str!='\0';str++)
{
len++;
}
return len;
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?

1219


Can a file other than a .h file be included with #include?

1110


What is difference between array and structure in c?

1107


Explain void pointer?

987


What is uint8 in c?

1062


Why is C language being considered a middle level language?

1061


What are the advantages and disadvantages of c language?

972


Explain the binary height balanced tree?

1133


What is the difference between ā€˜g’ and ā€œgā€ in C?

3930


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

2138


How can I ensure that integer arithmetic doesnt overflow?

1099


What happens if a header file is included twice?

990


What is pass by reference in c?

1150


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1659


Explain the process of converting a Tree into a Binary Tree.

2618