/* strings in C in C NULL terminated strings, last char is \0 - NULL CHARACTER write a program that reads a string characters and finds the number of chars in the string */ #include #include #define SIZE 20 int main(){ char str[SIZE]; int len=0, i; printf("enter string of max 19 chars\n"); scanf("%s", str); i=0; while(str[i]!='\0'){ len++; i++; } printf("string is %s\n", str); printf("Length of the string is %d\n", len); printf("using library function strlen length is %d\n", strlen(str)); return 0; }