Switch Statement In C In Hindi/ Switch Statement हिंदी में|
हेलो Friends, इस ब्लॉग पोस्ट(Switch Statement In C In Hindi) में मैं आपको Switch Statement के बारे में बताने वाला हूँ | Switch statement का use एक साथ एक से अधिक condition टेस्ट करने के लिए किया जाता है | तथा condition के true या false होने पर अलग अलग result display होते है |
Syntax:
Switch(expression)
{
case 1:
block 1;
break;
case 2:
block 2;
break;
default:
default block;
break;
}
next statement
Program to show the use of Switch statement|Switch Statement In C In Hindi!
#include<stdio.h>
#include<conio.h>
main()
{
float x, y, z;
char c;
printf(“enter any two number\n”);
scanf(“%f%f”, &x, &y);
printf(“\n1 – addition”);
printf(“\n2 – subtraction”);
printf(“\n3 – multiplication”);
printf(“\n4 – division”);
printf(“\n enter your choice 1-4:”);
c= getchar();
switch(c){
case1:
z= x+y;
printf(“result = %f”, &z);
break;
case2:
z = x-y;
printf(“result = %f”, &z);
case3:
z = x*y;
printf(“result = %f”, &z);
case4:
z = x/y;
printf(“%f”, &z);
default;
printf(“your choice is not correct\n”);
}}
You can also go through a few more amazing blog links related to C/C++:
Problems of procedure-oriented language in Hindi…
This Pointer In C++ In Hindi…
how to learn c language easily…
C Language Interview Question In Hindi…
Looping In C In Hindi…
Switch Statement In C In Hindi…
IF Statement In C In Hindi…
IF-Else Statement In C In Hindi…
Nested If-Else Statement In C In Hindi…
Top to bottom vs Bottom-up programming approach in Hindi…
इस ब्लॉग(Switch Statement In C In Hindi) को लेकर आपके मन में कोई भी प्रश्न है तो आप हमें इस पते a5theorys@gmail.com पर ईमेल लिख सकते है|
आशा करता हूँ, कि आपने इस पोस्ट ‘Switch Statement In C In Hindi.’ को खूब एन्जॉय किया होगा|
आप स्वतंत्रता पूर्वक अपना बहुमूल्य फीडबैक और कमेंट यहाँ पर दे सकते है|
आपका समय शुभ हो|