fork download
  1. # include <stdio.h>
  2.  
  3. int myStrlen(char s[]){
  4. int i=0;
  5. while(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
kamesan
stdout
kamesan -> 7