C-17-Q143mediumsingle_mcq
For input age = 25 in the voter program, the output is:
For input age = 25 in the voter program, the output is:
- aYou are not eligible for voting
- bYou are eligible for voting
- cInvalid age
- dNothing
ব্যাখ্যা
Since 25 is greater than or equal to 18, the if age >= 18 condition is True, so the eligible-for-voting branch executes. Only ages below 18 would trigger the alternative message.