Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> not using things like strlen() when iterating through a C-string

At the risk of making myself look stupid, is that because of O(n) vs O(n^2) (should be testing for \0), or is there another reason I'm not picking up?



Yeah, it's just to see if a person understands that some basic pointer operations and that regular strings in C are "special" because of their \0 at the end.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: