Write a function that will return x*7 without using multiplication?
Anonymous
You could either do this by macro or inline (it usually would be inlined). inline int mulby7(int x) { return (x << 3) - x; }
Check out your Company Bowl for anonymous work chats.