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. return i;
  8. }
  9.  
  10. int main(){
  11. int len;
  12. char s[100];
  13. scanf("%s",&s);
  14. len = myStrlen(s);
  15. printf("%s -> %d\n",s,len);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5284KB
stdin
abcd
stdout
abcd -> 4