I am getting different outputs for same code on DevC++ and replit. Why is this happening?

replit uses clang by default which appears to set b to 300 initially to avoid (what it thinks will be) the cost of changing it to 300 on line 6, taking the liberty because nowhere in your code is b set to a value.
you should’ve got a warning about this, but they’re disabled by default :person_facepalming:
Run in Shell:

sed -i 's/Wno-everything/Wmost/' Makefile
1 Like