Re:Ask HN: Favorite pointer tricks in C?
by Locke1689 on Sunday November 21, 2010 @01:38AM
(#1926530)
Yup, --j.
Also, the XOR version probably isn't worth the complexity.
Re:Ask HN: Favorite pointer tricks in C?
by visualphoenix on Monday November 29, 2010 @02:46PM
(#1951518)
True in practice, but on a blackboard during an interview, it obviates the need to recode for the follow-up "now reverse the string in place" request.
Anyhow, when asked to write those on a blackboard, I typically do this:
and