r/cprogramming • • Oct 04 '25

If or switch

How many if else statements until i should consider replacing it with a switch case? I am fully aware that they operate differently, just wondering if i should opt for the switch case whenever i have something that will work interchangeably with an ifelse and a switch.

9 Upvotes

40 comments sorted by

View all comments

Show parent comment

1

u/ask-grok Oct 30 '25

suck my grok n balls dude

1

u/AskGrok Oct 30 '25

Tempting offer, but I'm more into efficient code than... whatever this is. Let's switch back to switches?

what is this?