Computer Science, asked by khushirawat99, 5 months ago

switch ( p )

{

case 1: System.out.println(“One ”);

case 2: System.out.println(“Two ”);

case 3: System.out.println(“Three ”);

break;

case 4: System.out.println(“Four ”);

default: System.out.println(“Invalid Number”);

}

What will be the output of the above code if the value of p is:-

a. int p = 3

b. int p = 2

c. int p = 1

d. int p = 4

e. int p = 8​

Answers

Answered by Nothing123345678
0

Answer:

a. Output: Three

b. Output: Two

c. Output: One

d. Output: Four

e. Output: Invalid Number

Explanation:

Answer...Mark me brainliest and follow me

Similar questions