If-else-elseif statements

Hello, I have a doubt regarding the flow control of if/else statement. As we know that if we use multiple if statements , then whether the condition is true or false program will check condition inside all if blocks and all the if blocks whose condition is true will get executed. But what happens in case of if/else statement ? I mean if the condition of if block is true then also will it check the else block or the program will simply stop at if block.

Hey @yashsharma4304

If the if condition of a program will be true, then it will not execute the else statements.
Hope this would clear your doubt :grinning:

Ok so the flow will stop at if block. Right?

Yes @yashsharma4304 flow will be stopped at if statement only :slight_smile:

1 Like

Ok thank u for resolving the doubt.