Below is one of the interesting facts about C programming:
1) The case labels of a switch statement can occur inside if-else statement
#include
int main()
{
int a = 2, b = 2;
switch(a)
{
case 1:
;
if (b==5)
{
case 2:
printf("GeeksforGeeks");
}
else case 3:
{
}
}
}
Run on IDE
Output :GeeksforGeeks
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteNice and helpful..
ReplyDeletelearn C programming from basics with lot of examples....
⬇️⬇️⬇️
Loops in C examples
C pattern programming examples
C Arrays examples
if-else in C with examples
Strings in C with examples
and many more..