0

How many maximum nested ifs we can use in our code..?

Is there any limitation for using nested ifs

28th Feb 2020, 10:20 AM
Pritam Adsul
Pritam Adsul - avatar
3 odpowiedzi
+ 6
Depending on which language you're asking about, ofc - The language itself may not dictate any limits, but some are dependent on factors intrinsic to the compiler/interpreter implementation. E.g. https://stackoverflow.com/questions/2119223/c-c-control-structure-limitations You're usually not going to go anywhere near 200 nested ifs so it's supposed to be safe to assume no limit is present.
28th Feb 2020, 1:32 PM
Hatsy Rei
Hatsy Rei - avatar
+ 6
As much as you want, no limitation.
28th Feb 2020, 10:34 AM
Maz
Maz - avatar
+ 2
No. You can use as much as you want depending on your requirement. But if you have more more if cases then better to go for switch cases, be sure results same.
28th Feb 2020, 10:34 AM
Jayakrishna 🇮🇳