Which statement is preferred when there is a requirement to check multiple (more than 5) conditions in a program??
The options are- •nested if statement •if else statement •if statement •switch statement
It totally depends on what are the conditions you want to evaluate.
It depends on the conditions but writing more than a 5 if statement is horrible and must be avoided unless absolutely necessary, you should try to somehow check them in a loop, otherwise I guess switch would be the best option
According to me SWITCH is more preferable,but it will only be when there is any printing statement about the choice