Code:#include<stdio.h> main() { switch (i) { case 1: int a = 3; break; case 2:printf("hello"); break; } }I know that the first code will produce an error..But why does in the second code a gets declared even though it is inside switch and in the first code it doesnot even declare it??Code:#include<stdio.h> main() {switch (i) {int a = 3; case 1:printf("%d",a); break; case 2:printf("hello"); break; } }