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