Question -
What is the output of the given code?string = gets.chompcase stringwhen string = "a"print "alphabet a"when string = "b"print "alphabet b"when string = "c"print "alphabet c"else print "some other alphabet"end
Options:
A .  alphabet a
B .  b
alphabet b
C .  alphabet c
D .  Syntax error
Answer: Option B
After taking input from the user will check which string is entered and goes to particular case statement. Output: b alphabet b
Submit Your Solution hear: