Conditionals (if-else, Nested if and else if)

Поділитися
Вставка
  • Опубліковано 14 чер 2018
  • C Programming & Data Structures: Conditionals (if-else, Nested if and else if)
    Topics discussed:
    1) If else basics explained with a real-world example.
    2) Nested if basics explained with a real-world example.
    3) Else if basics explained with a real-world example.
    4) Frequently asked questions:
    i) Is it necessary to put the else part?
    ii) Difference between the examples with curly braces and without curly braces.
    iii) Why are curly braces used?
    C Programming Lectures: goo.gl/7Eh2SS
    Follow Neso Academy on Instagram: @nesoacademy(bit.ly/2XP63OE)
    Follow me on Instagram: @jaspreetedu(bit.ly/2YX26E5)
    Contribute: www.nesoacademy.org/donate
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy.org/recommende...
    Website ► www.nesoacademy.org/
    Forum ► forum.nesoacademy.org/
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #CProgrammingByNeso #CProgramming #ifelse #Nestedif #elseif

КОМЕНТАРІ • 129

  • @lifeislarge
    @lifeislarge 4 роки тому +99

    No one taught me if else like this i will never forget this😍😍

  • @blackcat1040
    @blackcat1040 3 роки тому +10

    Perfect!this is how students want their teachers to teach like this.love you bro 💖

  • @vishaliravichandran1314
    @vishaliravichandran1314 4 роки тому +10

    This is the best you tube channel for CS tutorials..i have ever seen..thank you

  • @palmtrees9474
    @palmtrees9474 Рік тому +5

    What an explanation! The greatest i've ever found on youtube! Hats off! Respect! 👍💪☝️💓

  • @samuelaniogbu5089
    @samuelaniogbu5089 Рік тому +6

    Oh my God!!!!! You've provided the best context to explain if-else-if statements. Much Love bro ♥

  • @deziderziga1484
    @deziderziga1484 Рік тому +5

    Damn you explained it so well

  • @gvantsasakaruli9900
    @gvantsasakaruli9900 Рік тому +2

    thank you for making this hell slightly more baring, as a physics student who was forced by the university to program (i have no idea what is going on, and in my opinion one can always hire a programmer to write a code that will calculate for me) and to program in C, the most antient one possible i don't think i'd even stand a chance to pass without these videos. thanks again.

    • @lloxias
      @lloxias 6 місяців тому

      same thing as a 10th grader

  • @mughahotoyeptho1615
    @mughahotoyeptho1615 3 роки тому +1

    Neso never put us down.. always there to provide us valuable knowledge.

  • @shahfaisal7760
    @shahfaisal7760 4 роки тому +8

    With respect from Pakistan ❤️love the method of teaching ❤️❤️❤️

  • @abishekbabu9247
    @abishekbabu9247 4 роки тому +2

    Thank you Sir for your Dedication 🙏 🙏🙏

  • @sadafnaeem3703
    @sadafnaeem3703 4 роки тому +2

    Best channel to learn the concept of CS 👌👌

  • @user-gw5lc2ks2v
    @user-gw5lc2ks2v 4 роки тому +3

    Thank you so much this helped me a lot . god bless you

  • @sonalibachhav9229
    @sonalibachhav9229 3 роки тому +5

    😲Wow, the way of your teaching is excellent👏

  • @user-tk1oh9fm7g
    @user-tk1oh9fm7g 11 місяців тому +1

    Excellento, perfecto, just what I needed.💯💯.Please make videos with real life examples like this one.

  • @daniyalkhan6635
    @daniyalkhan6635 4 роки тому +2

    thanks alot your examples are easily understandable

  • @sunnyghoshindra7561
    @sunnyghoshindra7561 2 роки тому +1

    Namaste sir.🙏🙏
    I never get anyone like you.
    Your teaching style is awesome.
    Love from Bangladesh 🇧🇩

  • @abdullahsadi819
    @abdullahsadi819 3 роки тому +2

    very good video and excellent work plus it is simple and clear cut for understanding

  • @ScholarStream_25
    @ScholarStream_25 4 роки тому +3

    He is so damn brilliant . Hands down NESO

  • @sumitkumar3710
    @sumitkumar3710 6 років тому +8

    Sir after long time...great to see u😇

  • @prakashsahu6396
    @prakashsahu6396 2 роки тому +2

    very very Nicely explained with live example. Thank you.

  • @rawbithra5407
    @rawbithra5407 2 роки тому +1

    So can we say if we have a second ‘option’ we can use else if? Simplify very informative and also filled in some gaps I had about control flow. Please can you more and relate them to androids and sites because I’ve been struggling to reach the actual examples to why we had to use such logic in the first place to execute a statement

  • @manishsemwal018
    @manishsemwal018 3 роки тому +4

    I understand everything abut if else in this video thank you sir 😌

  • @srijitpodder6206
    @srijitpodder6206 3 роки тому +2

    Mindblowing explanation.

  • @farhadamirov7284
    @farhadamirov7284 Рік тому +1

    Thanks. Perfect explanation I have ever seen.

  • @pratikghimire5788
    @pratikghimire5788 3 місяці тому +1

    Love from Nepal❤
    This is the best UA-cam channel ❤❤

  • @ddfg945
    @ddfg945 2 роки тому +2

    Upload introduction to programming and programming languages...
    Algorithms and data structures of each program languages

  • @jaimelomayno4152
    @jaimelomayno4152 2 роки тому +1

    Thats very clear, Good explanation!

  • @rakeshreddy7704
    @rakeshreddy7704 6 років тому +1

    Thank you sir.

  • @teja._.
    @teja._. 4 роки тому +2

    Wonderful real world example

  • @banjiolawole9952
    @banjiolawole9952 Рік тому +1

    You teach so well. How do I start watching your C tutorials from the first one? I can’t find this is the playlist.

  • @adityanpanchal6976
    @adityanpanchal6976 2 роки тому +2

    The condition part need the Boolean value., although why "if(if(1))" gets error??

  • @shrabonisinha
    @shrabonisinha 2 роки тому +1

    Thankyou for the example. Ot's very easy to understand

  • @vandanal7365
    @vandanal7365 Рік тому +1

    Great explanation sir

  • @shyger778
    @shyger778 Рік тому +1

    superb analogy
    this is cool!

  • @SuperBigsc
    @SuperBigsc Рік тому +1

    thank you mate.. its clear for me now

  • @abhijeetmore6343
    @abhijeetmore6343 9 місяців тому +1

    What a clear explanation ❤❤

  • @balajiramasamy2152
    @balajiramasamy2152 3 роки тому +1

    ur teaching that perfect congrats

  • @EduInquisitive
    @EduInquisitive 4 роки тому +62

    Your views on all videos are going to increase this year. I have shared your all videos on our university's course content online on blackboard. Your videos are amazing.
    -Professor from Chandigarh University

  • @Belalrazaa
    @Belalrazaa Рік тому +1

    increadible explanation❤

  • @70mmBlockbuster
    @70mmBlockbuster 2 роки тому +2

    MASTER AT WORK words suits you...

  • @alyaqistina597
    @alyaqistina597 7 місяців тому +1

    thankyouuu for teaching me

  • @meghanarajendra4296
    @meghanarajendra4296 4 роки тому +4

    Easy to learn 🤗👍

  • @sineadsthename
    @sineadsthename 2 роки тому +2

    This is so good

  • @diplomalife8018
    @diplomalife8018 2 роки тому +2

    You have many fans
    ❣️

  • @preethapadidhala5934
    @preethapadidhala5934 4 роки тому +3

    Outstanding 👌👌plz do more videos

  • @narenderkota6055
    @narenderkota6055 Рік тому +1

    What an explanation man!!

  • @ShivaniYadav-bm8rm
    @ShivaniYadav-bm8rm 3 роки тому +2

    when you teach us ,everything seems more easy

  • @xprostories5047
    @xprostories5047 6 років тому +2

    Am impressed

  • @sageersheikh1998
    @sageersheikh1998 3 роки тому +3

    Sir when u taught I feel like programming is very easy thing in this world...

  • @dhafaaa6823
    @dhafaaa6823 2 роки тому +1

    Thank you so much

  • @KrampOz
    @KrampOz 3 роки тому +2

    You're good at teaching better than my prof

  • @khajeshnarayana4407
    @khajeshnarayana4407 4 роки тому +2

    can we use more than one else if ladder

  • @AFCOE
    @AFCOE Рік тому +1

    Am regretting for knowing this channel 24hours left for my exams😂. BY THE WAY I have still gain much.
    THANKS PROF
    Please is there NESTED-FOR as NESTED-IF??

  • @epp6466
    @epp6466 3 роки тому +10

    You are the best!
    Thanks for taking the time to explain everything so easily.
    Regards from barcelona (spain) from a struggling C50 course taker.

  • @aryadas7786
    @aryadas7786 2 роки тому +2

    This is what teachers are to be make students grasp easily 😁

  • @mytube8884
    @mytube8884 5 років тому +4

    Please activate subtitles for all c programming course

  • @sadiqpasha3808
    @sadiqpasha3808 4 роки тому +3

    Outstanding

  • @Ravikumar-gj6qw
    @Ravikumar-gj6qw 4 роки тому +1

    Very useful tq bro

  • @gsrkj
    @gsrkj 4 місяці тому

    Nice explanation sir thank you keep doing sir all the best 🎉🎉

  • @mariapazherreraquiroz5552
    @mariapazherreraquiroz5552 4 роки тому +3

    I love you guys, you make me see the C light

  • @mayankjadhav4509
    @mayankjadhav4509 6 років тому +4

    Sir please post new videos in this playlist asap...I am preparing for placement... And this playlist is helping me a lot... Thank you😊

  • @gatecomputerscience1484
    @gatecomputerscience1484 2 роки тому +2

    Every thing is perfect

  • @raghut720
    @raghut720 Рік тому +1

    Thanks!

  • @ashamishra6687
    @ashamishra6687 5 років тому +2

    Sir please upload full series soon

  • @mehk9032
    @mehk9032 3 роки тому +3

    Best explanation 🥰😍🤩

  • @36_saniyaansarbidrishaikh96
    @36_saniyaansarbidrishaikh96 4 роки тому +2

    Very useful .....🤗

  • @parthgurav7732
    @parthgurav7732 2 місяці тому

    Thanks ✨️

  • @Gurukul22
    @Gurukul22 Рік тому +2

    Thank you gurujii😇🌼🤗🙏

  • @diwakarmr9124
    @diwakarmr9124 Рік тому +1

    very nice

  • @saimagull1716
    @saimagull1716 19 днів тому

    Amazing 😍🤩

  • @true4189
    @true4189 3 роки тому +1

    Thank u

  • @mauryaashish1865
    @mauryaashish1865 3 роки тому +5

    Congratulations for 1M Neso Academy Family🔥🔥🔥

  • @SurajKumar-rj1pc
    @SurajKumar-rj1pc 2 роки тому +1

    thnk you sir

  • @chaimaguechou3708
    @chaimaguechou3708 6 місяців тому +1

    What is difference between if and else if then ?

  • @manuhareddy8783
    @manuhareddy8783 3 роки тому +1

    simply wow

  • @ahmedhelmy9560
    @ahmedhelmy9560 Рік тому +1

    i want to the slides in course c

  • @kavyamandra3884
    @kavyamandra3884 3 роки тому +1

    I am bad at programming but after watching neso academy i am doing well

  • @techvlogs7187
    @techvlogs7187 3 роки тому +3

    perfection

  • @rangrezuzma9853
    @rangrezuzma9853 3 роки тому +2

    Sir plz start c++ .....Extremely needed

  • @phatesun
    @phatesun 3 роки тому +2

    Is there any difference between A an B?
    A:
    if(n == 4)
    printf("n is 4");
    if(n != 4)
    printf("n is not 4")
    B:
    if(n == 4)
    printf("n is 4");
    else
    printf("n is not 4")
    Does "else" can always change into "if" ?

    • @sharonjoe7535
      @sharonjoe7535 Рік тому +1

      You can construct as many as "If" you want, but you can't use an "else" command without a previous "if". You can replace a second "if" with an "else" if you know that the result is going to be either TRUE or FALSE.

    • @sanjana6931
      @sanjana6931 Рік тому

      A and B is same

  • @ishikapal9417
    @ishikapal9417 2 роки тому +1

    please make tutorial on python programming

  • @jeffubeku6143
    @jeffubeku6143 2 роки тому +2

    Great tutorial, however you compared an IF ELSE scenario to just an IF scenario in the last two examples about using curly braces or not. Not the same

  • @BishakhaBikhya
    @BishakhaBikhya 2 роки тому +2

    does indentation require after if, if we put only a single statement after it?

  • @gauravxyt4531
    @gauravxyt4531 4 роки тому +3

    At 6:55 as far i know there is post increment in n..then how it can be 6 after execution ...i think it should be 5 .. because it is post increment not pre

    • @youtubeweb3009
      @youtubeweb3009 4 роки тому +3

      I suck at explaining so how do i put this.hmmm
      Just think that if dealing with single standing increment/decrement i.e a++ , n++ , i ++
      then the process of incrementing value by one would be completed no matter what. ex.
      i = 0;
      i++
      Then i would be equal to 1 , as well as
      ++i it is equal to one now too.
      But when incrementing values is associated with equations ex.
      i = 0;.
      a= i++; here a = 0 and i = 1
      While
      i = 0;
      a= ++i; here a= 1 and i =1
      You have to exercise the rule of post and pre when dealing with equations.

    • @youtubeweb3009
      @youtubeweb3009 4 роки тому

      Hope it helps
      I suck ahahhaa

  • @arunkumarr2302
    @arunkumarr2302 4 роки тому +2

    Super 👌🏻👌🏻👌🏻👌🏻

  • @Sriram-ff2mx
    @Sriram-ff2mx 4 роки тому +2

    Welcome back neso.....😀😀😀

  • @koinahotahai
    @koinahotahai Рік тому +1

    Notes?

  • @diyadeepika6562
    @diyadeepika6562 4 роки тому +1

    How to install c in PC proper ly.... pls anyone answer

    • @hetaeramancer
      @hetaeramancer 3 роки тому

      download code blocks and then boom panis

  • @muhammadarith685
    @muhammadarith685 6 років тому +1

    Sir Please Complete the Syllabus...😧😧😧

  • @formaltechz
    @formaltechz 6 місяців тому +1

    Sir u just missed ; in example 2 for a printf function 😅 but excellence in ur

  • @revatig8784
    @revatig8784 2 роки тому

    Fast and best

  • @shanujpanicker3073
    @shanujpanicker3073 3 роки тому +1

    please give tutorial of python

  • @nimartamandhan431
    @nimartamandhan431 7 місяців тому +3

    Which IDE do you use?

  • @MAHIYAOFFICIAL
    @MAHIYAOFFICIAL 4 роки тому +2

    best best best

  • @ritikshrivastava9442
    @ritikshrivastava9442 3 роки тому +7

    Sir, Actually in the mentioned example there is error you forget to add termination
    int n =5 ;

  • @shivangisingh4143
    @shivangisingh4143 3 роки тому +2

    Waiting for Python videos sir

    • @hetaeramancer
      @hetaeramancer 3 роки тому

      nah, only c, c++, and java are beasts!

  • @anshiporwal2624
    @anshiporwal2624 3 роки тому +1

    8 out of 10

  • @Infinitycoder01
    @Infinitycoder01 3 роки тому +2

    Got 6/10..Thank u neso for helping me in improving the c language..,I got better conceptual clarity.keep helping by giving free education to all..,make the country proud...😀❤️❤️

  • @lanzhan714
    @lanzhan714 Рік тому +1

    greetings everyone

  • @bhavani7327
    @bhavani7327 Рік тому

    5