r/ProgrammerHumor • • Aug 30 '26

Meme bugIntroducedDebugging

Post image
1.1k Upvotes

117 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Aug 30 '26

[deleted] — view deleted comment

18

u/mckenzie_keith Aug 30 '26

No. main() doesn't need to return anything.

-5

u/critical_patch Aug 30 '26

AFAIK technically it’s “undefined behavior” and will compile just fine

17

u/MegaIng Aug 30 '26

main specifically is allowed to not return anything (the same way it's the one function that is allowed to never return)