Interview Question

A C language macro to compute maximum of two ints is generally written as
#define  max(a,b)   (a > b? a : b)
Now write it without using the ternary operator “?:”

Hint: This is inspired by puzzle #160 in Nick’s Puzzles — An excellent site, also gives hints and solutions.

Advertisements