#include #define CHARS 100 int len(char *str) { char *s; for(s = str; *s; ++s); return s - str; } int main(void) { char str[CHARS]; scanf("%s", &str); printf("%d\n",len(str)); getch(); }