If you wrote a program asking the user to enter a color (such as red, blue, etc.) would it be possible to use a switch statement to compare the user’s color to a program color? (In other words, could you use as case statement like this? case “red”:)

What will be an ideal response?

No, you could not use string “red” in a case statement. The switch only allows integer or characters to be compared in a case statement.

Computer Science & Information Technology

You might also like to view...

If you want a user to select several choices you should use:

a) a ListBox b) a CheckListBox c) either a ListBox or a CheckedListBox d) neither a ListBox or a CheckedListBox

Computer Science & Information Technology

A saved Action file will have a(n) ____ extension.

A. ATN B. PNG C. ACT D. JPG

Computer Science & Information Technology