strlen function(String Length) in C Language – example and detail

In the C Programming Language, the strlen characteristic returns the length of the string pointed to with the aid of s. It does no longer consist of the null persona in the length calculation.

Syntax

The syntax for the strlen characteristic in the C Language is:

size_t strlen(const char *s);

Parameters or Arguments

s

The string whose length you want to calculate.

Returns

The strlen function returns the size of the string pointed to by means of s. It does now not consist of the null personality in the size calculation.

Required Header

In the C Language, the required header for the strlen characteristic is:

#include <string.h>

Applies To

In the C Language, the strlen characteristic can be used in the following versions:

ANSI/ISO 9899-1990