fork download
  1. /*string04.c*/
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. int main(void)
  6. {
  7. // your code goes here
  8. char str[32];
  9. size_t len;
  10.  
  11. printf("Input string--\n");
  12. scanf("%s",str);
  13.  
  14. len = strlen(str);
  15. printf("Length of %s is%d\n",str);
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5308KB
stdin
ABCDE
stdout
Input string--
Length of ABCDE is0