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