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