Computer Science, asked by TbiaSamishta, 11 months ago

Complete the following program and find the output.
main()
{char ch="*";
switch (ch)
{
case'*"; printf("%c",ch);
case "?" :printf("%c" ,ch);
default : printf("%c" ,*) }}

Answers

Answered by Secondman
0

"Img 56_11

The above completed code uses switch statement on a character type variable “ch”.

If “ch” is equal to * (asterisk), then it will print the value of ch, and other cases will also be executed as no break statement is written after the case statement.

This is call fall through condition in programming. Similarly, the other cases will work with a fall through condition."

Attachments:
Similar questions