What will be output when you will execute following c code?#include
void main() {
switch(2) {
case 1L:printf("No");
case 2L:printf("%s","I");
goto Love;
case 3L:printf("Please");
case 4L:Love:printf("Hi");
}
}

What will be output when you will execute following c code?#include <stdio.h>
void main() {
switch(2) {
case 1L:printf("No");
case 2L:printf("%s","I");
goto Love;
case 3L:printf("Please");
case 4L:Love:printf("Hi");
}
} Correct Answer IHi

It is possible to write label of goto statement in the case of switch case statement.

Related Questions

What happens if the following program is compiled and executed? interface MyInterface{ void display(); } interface MySubInterface extends MyInterface{ void display(); } public class Test implements MySubInterface{ public void display(){ System.out.print("Welcome to Examveda."); } public static void main(String args[]){ Test t = new Test(); t.display(); } }