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