See AnswerAns: When we want to make a choice among two or more statements, then decision making statements are needed mostly.
How many types of Decision making statements?
See AnswerAns: 4 Types.
1. Simple If
2. if-else
3. Ladder if-else
4. Nested if-else
What is the importance of blocks?
See AnswerAns: When more than one statements want to execute in the if condition and else statement then we must need to create blocks.
When else blocks become necessary?
See AnswerAns: Else blocks are very necessary to create because when more than one statement is made in the else blocks, because if we don't create else blocks then the statements given in the else are treated as common statements except Ist statement.
When to use Ladder if-else?
See AnswerAns: Generally, When more than two conditions are given we use ladder-if-else.
When to use nested if-else?
See AnswerAns: When a condition depends on another condition to execute then we use nested if-else.
How logical operator AND(&&)works?
See AnswerAns: In AND(&&) Operator, If all conditions are true then the result wiil be true. When one othe given conditions is false, the result will become false. When, one condition is false then any other condition will not be check in AND(&&) operator.
What is the difference between =(Assignment Operator) and ==(equality operator).
See AnswerAns: Assignment operator(=) assign the values from left to right eg. x=5; Equality operator(==) check the equality whether a value is equal to another value or not? eg. if(a==b) or not?