+ 2

For which purpose we use strlen?

2nd Jan 2018, 4:20 PM
Puneet Bhardwaj
Puneet Bhardwaj - avatar
2 Réponses
+ 7
we use strlen() to get the length of the string ( char[]) example : // string.h char name[20]; // take input int len = strlen(name); printf("Length of name is %d",len);
2nd Jan 2018, 4:39 PM
MR Programmer
MR Programmer - avatar
+ 1
to find the lenght of a string ... it's in string.h header file
4th Jan 2018, 2:34 PM
sagar bayar
sagar bayar - avatar