adplus-dvertising
frame-decoration

Question

What is wrong with the following if-else structure?
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’

Answer: (a).No error

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 __________

Q. What is the comparison operator to find if two values are equal?

Q. What is the result of the expression 10-5>3*4-2?

Q. What is the result of the expression 10-2+20>2*14-2?

Q. What is the result of the expression 10-2+20 ><2*25-2?

Q. __________ operator reverses the truth value of the operation.

Q. __________ operator returns true, if all the sub-conditions are true.

Q. __________ operator returns true, if any of the sub-condition is true.

Q. And operator checks both the sub-conditions whereas AndAlso operator does __________

Q. And operator checks both the sub-conditions whereas OrElse operator does __________

Q. Which logical operator does not allow us to combine two or more conditions?

Q. String comparison in Visual basic is case-sensitive.

Q. __________ is used to converting a string to uppercase.

Q. The __________ operator reverses the value of the condition.

Q. If the txtPrice control contains the value 75, what value will the variable=Decimal.TryParse (txtPrice.Text,decPrice) method return?

Q. If the txtPrice control contains the value 75, what value will the Decimal.TryParse (txtPrice.Text,decPrice) method return?

Q. Which is used to check both the conditions in a given if statement?

Q. Which is used to check one among both the conditions in a given if statement?

Q. When a selection structure’s true part or false part contains another selection structure, the inner selection structured is referred to as __________

Q. Most common error that occur in selection structure is __________