Question
If intQuantity > 5 Then
dblDiscountRate = .1
Else
dblDiscountRate = .05
End If
a.
No error
b.
Conditions not in brackets
c.
No ; after statements
d.
‘Then’ should have been ‘then’
Posted under Visual Basic
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is wrong with the following if-else structure?
Similar Questions
Discover Related MCQs
Q. Comparison operators are also termed as __________
View solution
Q. What is the comparison operator to find if two values are equal?
View solution
Q. What is the result of the expression 10-5>3*4-2?
View solution
Q. What is the result of the expression 10-2+20>2*14-2?
View solution
Q. What is the result of the expression 10-2+20 ><2*25-2?
View solution
Q. __________ operator reverses the truth value of the operation.
View solution
Q. __________ operator returns true, if all the sub-conditions are true.
View solution
Q. __________ operator returns true, if any of the sub-condition is true.
View solution
Q. And operator checks both the sub-conditions whereas AndAlso operator does __________
View solution
Q. And operator checks both the sub-conditions whereas OrElse operator does __________
View solution
Q. Which logical operator does not allow us to combine two or more conditions?
View solution
Q. String comparison in Visual basic is case-sensitive.
View solution
Q. __________ is used to converting a string to uppercase.
View solution
Q. The __________ operator reverses the value of the condition.
View solution
Q. If the txtPrice control contains the value 75, what value will the variable=Decimal.TryParse (txtPrice.Text,decPrice) method return?
View solution
Q. If the txtPrice control contains the value 75, what value will the Decimal.TryParse (txtPrice.Text,decPrice) method return?
View solution
Q. Which is used to check both the conditions in a given if statement?
View solution
Q. Which is used to check one among both the conditions in a given if statement?
View solution
Q. When a selection structure’s true part or false part contains another selection structure, the inner selection structured is referred to as __________
View solution
Q. Most common error that occur in selection structure is __________
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Visual Basic? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!