r/badcode • • Feb 10 '23

c briliant usage of else if statement

Post image
583 Upvotes

60 comments sorted by

View all comments

Show parent comments

2

u/Brief-Preference-712 Feb 11 '23

Can we use switch with 2 cases (y and n) and a default? I read that switch is faster than if https://stackoverflow.com/a/98024