a) A switch statement enables WinRunner to make a decision based on an expression that can have more than two values.
It has the following syntax:
switch (expression )
{
case case_1: statements
case case_2: statements
case case_n: statements
default: statement(s)
}
b) The switch statement consecutively evaluates each case expression until one is found that equals the initial expression. If no case is equal to the expression, then the default statements are executed. The default statements are optional.

[Source: JAGAN MOHAN "Interview questions bible"]






Answers and Comments