This function counts the number of characters present in a string.
Hence, strlen() function return always numeric value.
syntax:
strlen("Any_string");
example:
strlen("C Program");
It return : 9
The following program illustrated the uses of strlen() function as:
/*c program to illustrate the use of strlen function*/
#include<stdio.h>
int main()
{
int len;
char str[40];
Hence, strlen() function return always numeric value.
syntax:
strlen("Any_string");
example:
strlen("C Program");
It return : 9
The following program illustrated the uses of strlen() function as:
/*c program to illustrate the use of strlen function*/
#include<stdio.h>
int main()
{
int len;
char str[40];