>>1
Personally, I'd just write a generic function, since it will work with arrays and structs as well (and I guess I just prefer using functions over macros). Aside from that, I don't think there's anything largely wrong with what you're doing.
#include <stdio.h>