News for hackers. Stuff that matters.
Re:The string type is broken by chiph on Wednesday November 27, 2013 @08:34AM (#6807929)
I've been waiting for someone to ask me to reverse a string in an interview, so I can tell them why the code I just wrote for them (using the XOR trick, which is what they're usually expecting), is wrong.
Re:The string type is broken by zwily on Wednesday November 27, 2013 @09:01AM (#6808037)
When I've asked people to reverse a char* in the past, it's just been to see if they understand the basics of pointers. The XOR "trick" hasn't been impressive since high school. :)