your code resolves to this if you put in the braces:
Code:
#define testNeg(x) if (x>0) printf("Ouuch\n")
if(a>b) {
if (x > 0) {
printf("Ouuch\n");
}
else {
printf("arrgh\n");
}
}
printf("Thank you");
now follow the logic of what happens when a = -4 and b = -3. this is a good reason to always use braces in if-else.
edit from MSDN c reference : When nesting if statements and else clauses, use braces to group the statements and clauses into compound statements that clarify your intent. If no braces are present, the compiler resolves ambiguities by associating each else with the closest if that lacks an else.