Question #797

Can we use [b]switch[/b] operator for strings?

Expert's answer

Yes, the operator switch can be used with string variables and any integers.
The sample program would be

string command;
..........................
switch(command)
{
case "Mean"
{
.........
break;
}
case "Max"
{
............
break;
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS