fork download
  1. # include <stdio.h>
  2.  
  3. int myStrlen(char s[]){
  4. int i=0;
  5. while(s[i]!='\0'){
  6. i++;}
  7. return i;
  8. }
  9.  
  10. int main(){
  11. int len;
  12. char s[100];
  13. scanf("%s",s);
  14. len = myStrlen(s);
  15. printf("%s -> %d\n",s,len);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5288KB
stdin
abcdeee
stdout
abcdeee -> 7