what is the difference between #if and #ifdef?
2 Answers. #if checks for the value of the symbol, while #ifdef checks the existence of the symbol (regardless of its value). #if can also be used for other tests or for more complex preprocessor conditions.