Length of string without build in function.
#include <stdio.h> #include<string.h> int main() { char s[]="Learn and share blog"; int count; for(count = 0; s[count] != '\0'; count++); printf("String Length : %d\n", count); return 0; }
output:
String Length : 20