fork download
  1. # include <stdio.h>
  2.  
  3. int myStrlen(char s[])
  4. {
  5. int i;
  6. for(i=0;s[i]!='\0';i++)
  7. ;
  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
abcd -> 4