Control Instructions

Q1:
Which of the following statements are correct?
  1. A switch statement can act on numerical as well as Boolean types.
  2. A switch statement can act on characters, strings and enumerations types.
  3. We cannot declare variables within a case statement if it is not enclosed by { }.
  4. The foreach statement is used to iterate through the collection to get the desired information and should be used to change the contents of the collection to avoid unpredictable side effects.
  5. All of the expressions of the for statement are not optional.

A 1, 2

B 2, 3

C 3, 5

D 4, 5

E None of these

ANS:A - 1, 2

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.