Predict the output of following code:
main()
{
int a=2;
switch(a)
{
case 1: printf(“one”);
case 2: printf(“Two”);
// Executable code ; No break statement
case 3: printf(“Three”);
default:printf(“Invalid option”);
}
}
1. onetwothree
2. Invalid option
3. one two
4. None of these
Answers
Answered by
0
one two is the correct answer
Similar questions
Math,
7 months ago
Social Sciences,
7 months ago
Social Sciences,
1 year ago
Math,
1 year ago
Computer Science,
1 year ago