Nested If-Else Statement In C In Hindi/ Nested If-Else हिंदी में|

हेलो Friends, इस ब्लॉग पोस्ट(Nested If-Else Statement In C In Hindi) में मैं आपको Nested IF_Else Statement के बारे में बताने वाला हूँ |

इस command का use एक साथ एक से अधिक condition test(Nested If-Else Statement In C In Hindi) करने के लिए किया जाता है |

टेस्ट कि गयी condition(Nested If-Else Statement In C In Hindi) के आधार पर उनके right और wrong होने पर अलग अलग result प्राप्त होते है |

Syntax:

if(test condition)
{
if(test condition1)
{
statement;
}
else
{
statement;
}
else
{
statement;
}

Program Using Nested If_Else statement|Nested If-Else Statement In C In Hindi!

एक ऐसा program बनाइये जिसमे तीन दी हुई values में से सबसे बड़ी value find कर सके?

#include<stdio.h>
#include<conio.h>
main()
{
float a, b, c;
printf("Enter the three values\n");
scanf("%f%f%f\n",&a,&b,&c);
printf("highest value is  = ");
if(a>b)
{
if(a>c)
printf("%f", &a);
else
printf("%f", &c);
}
Else
{
if(b>c)
printf("%f", &b);
else
printf("%f", &c);
getch();
}}

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…

Quick Q&A:

What is a nested if-else? nested if -else statement क्या होता है?

जब एक if -else statement किसी अन्य if -else के अंदर present होता है, तब हम इसे nested if -else statement बोलते है |

What is a nested if statement in programming? programming में nested if statement क्या होता है?

nested if statement का उपयोग generally हम तब करते है जब हमें एक condition के अंदर कोई और condition test करने की जरुरत पड़ती है|

कोई भी nested if statement में, जब outer if statement true return करता है, तब कही पर यह body में जा कर inner if statement को चेक किया जाता है |

What are the two forms of nested if statements? Nested if statement के दो प्रकार कौन से होते है?

Nested if statement के दो प्रकार निम्नलिखित है:

पहले वाले प्रकार में outer if statement के else clause को छोड़ दिया जाता है |

जबकि दूसरे प्रकार में outer और inner दोनों if statements के else clause को छोड़ दिया जाता है |

What is the syntax for a nested if-else statement? Nested if -else statement का syntax क्या होता है?

Nested if -else statement का syntax निम्नलिखित है:

if(condition) {
    //Nested if else inside the body of "if"
    if(condition2) {
       //Statements inside the body of nested "if"
    }
    else {
       //Statements inside the body of nested "else"
    }
}
else {
    //Statements inside the body of "else"
}

What is the difference between nested if and nested else if? Nested if और Nested else if में क्या अंतर होता है ?

शायद इनमे कोई भी अंतर नहीं होता है| actually में if , else if , else सभी conditions नेस्टेड के जैसे ही होती है अगर आप किसी एक {} enclosures को हटा लेते है तो |

How to write else if in C? C में Else if को कैसे लिखते है?

C में Else -if को निम्न तरीके से लिखते है:

if(condition1){
//code to be executed if condition1 is true.
}else if(condition2){
//code to be executed if condition2 is true.
}
else if(condition3){
//code to be executed if condition3 is true.
}

What are the different types of if statements in C? C में कितने प्रकार के if statements होते है?

C में चार प्रकार के if statements होते है जो निम्नलिखित है:

simple if,
if-else,
nested if-else,
else-if ladder

C में if statement जो है वो two -way branching और multi -branching statements को support करता है|

Is there a limit to if-else statements? If -else statements की कोई limit होती है ?

देखिये एक If केवल एक else ही रखेगा|

पर इसके अंदर आप कितनी बार भी “elseif” स्टेटमेंट्स को उसे कर सकते है |

और यह सभी elseif statements जो है वो एक same nesting level को शेयर करते है |

How do you write 3 conditions in if-else? if-else के अंदर आप तीन कंडीशंस को किस प्रकार से लिख सकते है?

यह हम निम्नलिखित तीन तरीको से कर सकते है:

Method 1: Nested IF Function. =IF(C2<15, “Bad”, IF(C2<20, “OK”, IF(C2<25, “Good”, “Great”)) 

Method 2: IF Function with AND Logic. =IF(AND(A2=”Mavs”, B2=”Guard”, C2>25), “Yes”, “No”)

Method 3: IF Function with OR Logic.

इस ब्लॉग(Nested If-Else Statement In C In Hindi) को लेकर आपके मन में कोई भी प्रश्न है तो आप हमें इस पते a5theorys@gmail.com पर ईमेल लिख सकते है|

आशा करता हूँ, कि आपने इस पोस्ट ‘Nested If_Else Statement In C In Hindi.’ को खूब

एन्जॉय किया होगा|

आप स्वतंत्रता पूर्वक अपना बहुमूल्य फीडबैक और कमेंट यहाँ पर दे सकते है|

आपका समय शुभ हो|

Anurag

I am a blogger by passion, a software engineer by profession, a singer by consideration and rest of things that I do is for my destination.