With using User-defined Function Write a Program to Find Length of String
#include<stdio.h>
#include<conio.h>
int FindLength(char str[]); // Prototype Declaration
void main()
{
char str[100];
int length;
/*----------------------------------------------------------
Step1 : >> Accept The String from User
>> To accept String with Spaces use gets
--------------------------------------------------------*/
printf("nEnter the String : "); gets(str);
/*----------------------------------------------------------
Step 2 : >> Compute Length ,Call Find Length Function
-------------------------------------------------------*/
length = FindLength(str);
printf("\nLength of the String is : %d",length);
getch();
}
/*----------------------------------------------------------
Write Function Definition Here
--------------------------------------------------------*/
int FindLength(char str[])
{
int len = 0;
while(str[len]!='\0')
len++;
return(len);
}
Incoming search terms:
- finding string length using user defined function in (2)
- write java program to find length of a string (2)
- Wap a c program to find length of string (2)
- write a c program to calculate the length of a given string using user defined function (2)
- userdefine method to calculate the length of string in java (1)
- user defined function to determine length of a string (1)

