In if structure the block of statements is executed only,
- AWhen the condition is false
- BWhen it contain arithmetic operators
- CWhen it contain logical operators
- DWhen the condition is true
The if block runs only when its condition evaluates to true.
MCQs, short and long questions from lecture 5.Lecture 5 ki MCQs, short aur long sawal.
3 MCQs · 3 MCQs from past papers3 MCQs · 3 MCQs past papers se
In if structure the block of statements is executed only,
The if block runs only when its condition evaluates to true.
What will be the value of variable "input" if the initial value of input is 67? if(input >= 50) input = input + 1; if(input <= 75) input = input + 2; else input = input - 1;
67 >= 50 gives 68; 68 <= 75 adds 2, giving 70.
When the if statement consists more than one statement then enclosing these statement in curly braces is,
Without braces only the first statement belongs to the if.
No MCQs match this filter.Is filter mein koi MCQ nahi.
No short questions added yet.Abhi koi short sawal shamil nahi.
No long questions added yet.Abhi koi long sawal shamil nahi.