Computer Science, asked by ravendrasrivastava68, 6 months ago

please tell me this answer ​

Attachments:

Answers

Answered by Vyomsingh
2

Code:-

int n=3;

int m=n+1;//m=4

switch (m)// value of m is 4

{

case 1:// This part will not executed as m≠1

System.out.print("CITY");

break;

case 2:// This part will not executed as m≠2

System.out.print("MONTESSORI");

break;

case 1:// This part will not executed as m≠3

System.out.print("SCHOOL");

break;

default:// This part will executed becuse neither case match

System.out.print("Wrong input");

}

_______________________________

Output:-

Wrong input

_______________________________

Reason:-

No case matched with stored value of m which is 4(n+1)

_____________________________24112002

RADHE RADHE ❤️❤️

Similar questions