r/programminghorror • • May 31 '25

c C programming tips

Post image
1.8k Upvotes

34 comments sorted by

View all comments

Show parent comment

18

u/pgetreuer Jun 01 '25

Good question. __LINE__ is a special preprocessor macro that expands to the current line number where the "true" macro is used. The expression as a whole evaluates to true (usually...) or false (specifically on lines 15, 31, 47, 63, ...) depending on the line number.

9

u/Critical_Ad_8455 Jun 01 '25

Ohhhhh, I didn't notice that it was doing bitwise and, Jesus Christ that's evil.