In this C program, We will show “How to Calculate String Length Using Strlen() Function ” . So, let’s do it …
#include<stdio.h>
int main()
{
char A[100] = "Md Nazmul Hasan Hasan";
strlen(A);
printf("Length = %d",strlen(A);
return 0;
}
Or,
#include<stdio.h>
int main()
{
char A[100] = "Md Nazmul Hasan Hasan";
int len = strlen(A);
printf("Length = %d",len);
return 0;
}
Keep Learning with PrologiCode.