fork download
  1. #include <stdio.h>
  2. #include <stddef.h>
  3.  
  4. size_t str_len(const char *s) {
  5. const char *p = s;
  6. while (*p++);
  7. return (p - s);
  8. }
  9.  
  10. int main(void) {
  11. printf("%zu", str_len("hello"));
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 4376KB
stdin
Standard input is empty
stdout
6