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