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

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • 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...
    Memberships: bit.ly/2U7YSPI
    Books: www.nesoacademy...
    Website ► www.nesoacademy...
    Forum ► forum.nesoacade...
    Facebook ► goo.gl/Nt0PmB
    Twitter ► / nesoacademy
    Music:
    Axol x Alex Skrindo - You [NCS Release]
    #CProgrammingByNeso #CProgramming #ifelse #Nestedif #elseif

ความคิดเห็น • 133

  • @lifeislarge
    @lifeislarge 5 ปีที่แล้ว +102

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

  • @EduInquisitive
    @EduInquisitive 4 ปีที่แล้ว +61

    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

  • @deziderziga1484
    @deziderziga1484 ปีที่แล้ว +5

    Damn you explained it so well

  • @adityanpanchal6976
    @adityanpanchal6976 2 ปีที่แล้ว +2

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

  • @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

  • @ddfg945
    @ddfg945 2 ปีที่แล้ว +2

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

  • @nimartamandhan431
    @nimartamandhan431 10 หลายเดือนก่อน +4

    Which IDE do you use?

  • @shahfaisal7760
    @shahfaisal7760 4 ปีที่แล้ว +8

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

  • @70mmBlockbuster
    @70mmBlockbuster 2 ปีที่แล้ว +2

    MASTER AT WORK words suits you...

  • @preethapadidhala5934
    @preethapadidhala5934 4 ปีที่แล้ว +3

    Outstanding 👌👌plz do more videos

  • @vishaliravichandran1314
    @vishaliravichandran1314 5 ปีที่แล้ว +10

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

  • @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??

  • @samuelaniogbu5089
    @samuelaniogbu5089 2 ปีที่แล้ว +6

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

  • @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 2 ปีที่แล้ว +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

  • @Gurukul22
    @Gurukul22 ปีที่แล้ว +2

    Thank you gurujii😇🌼🤗🙏

  • @ishikapal9417
    @ishikapal9417 2 ปีที่แล้ว +1

    please make tutorial on python programming

  • @palmtrees9474
    @palmtrees9474 2 ปีที่แล้ว +5

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

  • @formaltechz
    @formaltechz 8 หลายเดือนก่อน +1

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

  • @diplomalife8018
    @diplomalife8018 2 ปีที่แล้ว +2

    You have many fans
    ❣️

  • @rangrezuzma9853
    @rangrezuzma9853 4 ปีที่แล้ว +2

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

  • @sonalibachhav9229
    @sonalibachhav9229 3 ปีที่แล้ว +5

    😲Wow, the way of your teaching is excellent👏

  • @manishsemwal018
    @manishsemwal018 3 ปีที่แล้ว +4

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

  • @BishakhaBikhya
    @BishakhaBikhya 2 ปีที่แล้ว +2

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

  • @mehk9032
    @mehk9032 3 ปีที่แล้ว +3

    Best explanation 🥰😍🤩

  • @sumitkumar3710
    @sumitkumar3710 6 ปีที่แล้ว +8

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

  • @gatecomputerscience1484
    @gatecomputerscience1484 2 ปีที่แล้ว +2

    Every thing is perfect

  • @mytube8884
    @mytube8884 5 ปีที่แล้ว +4

    Please activate subtitles for all c programming course

  • @shyger778
    @shyger778 ปีที่แล้ว +1

    superb analogy
    this is cool!

  • @sageersheikh1998
    @sageersheikh1998 3 ปีที่แล้ว +3

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

  • @prakashsahu6396
    @prakashsahu6396 3 ปีที่แล้ว +2

    very very Nicely explained with live example. Thank you.

  • @pratikghimire5788
    @pratikghimire5788 5 หลายเดือนก่อน +1

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

  • @khajeshnarayana4407
    @khajeshnarayana4407 4 ปีที่แล้ว +2

    can we use more than one else if ladder

  • @sineadsthename
    @sineadsthename 2 ปีที่แล้ว +2

    This is so good

  • @Official-tk3nc
    @Official-tk3nc 4 ปีที่แล้ว +3

    how many of you know that it is samsung phone?

    • @reshamxsk
      @reshamxsk 4 ปีที่แล้ว +1

      🙋‍♀️

  • @riadelfethouni32
    @riadelfethouni32 2 ปีที่แล้ว +1

    ah yes the random indian dude that'll help me pass my exams

  • @shrabonisinha
    @shrabonisinha 2 ปีที่แล้ว +1

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

  • @techvlogs7187
    @techvlogs7187 3 ปีที่แล้ว +3

    perfection

  • @SuperBigsc
    @SuperBigsc ปีที่แล้ว +1

    thank you mate.. its clear for me now

  • @dhafaaa6823
    @dhafaaa6823 2 ปีที่แล้ว +1

    Thank you so much

  • @shivangisingh4143
    @shivangisingh4143 4 ปีที่แล้ว +2

    Waiting for Python videos sir

    • @hetaeramancer
      @hetaeramancer 3 ปีที่แล้ว

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

  • @chaimaguechou3708
    @chaimaguechou3708 8 หลายเดือนก่อน +1

    What is difference between if and else if then ?

  • @aryadas7786
    @aryadas7786 3 ปีที่แล้ว +2

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

  • @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

  • @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 8 หลายเดือนก่อน

      same thing as a 10th grader

  • @Belalrazaa
    @Belalrazaa ปีที่แล้ว +1

    increadible explanation❤

  • @KrampOz
    @KrampOz 3 ปีที่แล้ว +2

    You're good at teaching better than my prof

  • @meghanarajendra4296
    @meghanarajendra4296 5 ปีที่แล้ว +4

    Easy to learn 🤗👍

  • @abdullahsadi819
    @abdullahsadi819 4 ปีที่แล้ว +2

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

  • @hosmjrshinh2675
    @hosmjrshinh2675 4 ปีที่แล้ว +1

    Many unlucky peoples are this finding this type of content....

  • @blackcat1040
    @blackcat1040 3 ปีที่แล้ว +10

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

  • @anshiporwal2624
    @anshiporwal2624 3 ปีที่แล้ว +1

    8 out of 10

  • @alyaqistina597
    @alyaqistina597 10 หลายเดือนก่อน +1

    thankyouuu for teaching me

  • @Margo-v2k
    @Margo-v2k 4 ปีที่แล้ว +3

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

  • @ScholarStream_25
    @ScholarStream_25 4 ปีที่แล้ว +3

    He is so damn brilliant . Hands down NESO

  • @kavyamandra3884
    @kavyamandra3884 3 ปีที่แล้ว +1

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

  • @vandanal7365
    @vandanal7365 ปีที่แล้ว +1

    Great explanation sir

  • @KAYLEEZEE-z4j
    @KAYLEEZEE-z4j ปีที่แล้ว +1

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

  • @shanujpanicker3073
    @shanujpanicker3073 4 ปีที่แล้ว +1

    please give tutorial of python

  • @ahmedhelmy9560
    @ahmedhelmy9560 ปีที่แล้ว +1

    i want to the slides in course c

  • @mr.unknown0815
    @mr.unknown0815 3 ปีที่แล้ว +1

    Lenovo ka phone hai😂

  • @daniyalkhan6635
    @daniyalkhan6635 5 ปีที่แล้ว +2

    thanks alot your examples are easily understandable

  • @jaimelomayno4152
    @jaimelomayno4152 2 ปีที่แล้ว +1

    Thats very clear, Good explanation!

  • @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.

  • @MAHIYAOFFICIAL
    @MAHIYAOFFICIAL 5 ปีที่แล้ว +2

    best best best

  • @farhadamirov7284
    @farhadamirov7284 2 ปีที่แล้ว +1

    Thanks. Perfect explanation I have ever seen.

  • @ojoclement2943
    @ojoclement2943 6 วันที่ผ่านมา +1

    If and only if

  • @mauryaashish1865
    @mauryaashish1865 3 ปีที่แล้ว +5

    Congratulations for 1M Neso Academy Family🔥🔥🔥

  • @ShivaniYadav-bm8rm
    @ShivaniYadav-bm8rm 3 ปีที่แล้ว +2

    when you teach us ,everything seems more easy

  • @Ruchi-k1y
    @Ruchi-k1y 6 หลายเดือนก่อน

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

  • @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

  • @mohammadasadullah3642
    @mohammadasadullah3642 26 วันที่ผ่านมา

    man this is amazing I am going to finish the whole series inshallah thanks for this

  • @sadiqpasha3808
    @sadiqpasha3808 5 ปีที่แล้ว +3

    Outstanding

  • @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...😀❤️❤️

  • @ashamishra6687
    @ashamishra6687 5 ปีที่แล้ว +2

    Sir please upload full series soon

  • @sunnyghoshindra7561
    @sunnyghoshindra7561 3 ปีที่แล้ว +1

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

  • @narenderkota6055
    @narenderkota6055 ปีที่แล้ว +1

    What an explanation man!!

  • @true4189
    @true4189 4 ปีที่แล้ว +1

    Thank u

  • @teja._.
    @teja._. 4 ปีที่แล้ว +2

    Wonderful real world example

  • @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.

  • @srijitpodder6206
    @srijitpodder6206 4 ปีที่แล้ว +2

    Mindblowing explanation.

  • @abhijeetmore6343
    @abhijeetmore6343 11 หลายเดือนก่อน +1

    What a clear explanation ❤❤

  • @abishekbabu9247
    @abishekbabu9247 5 ปีที่แล้ว +2

    Thank you Sir for your Dedication 🙏 🙏🙏

  • @lanzhan714
    @lanzhan714 ปีที่แล้ว +1

    greetings everyone

  • @36_saniyaansarbidrishaikh96
    @36_saniyaansarbidrishaikh96 5 ปีที่แล้ว +2

    Very useful .....🤗

  • @SurajKumar-rj1pc
    @SurajKumar-rj1pc 2 ปีที่แล้ว +1

    thnk you sir

  • @mughahotoyeptho1615
    @mughahotoyeptho1615 3 ปีที่แล้ว +1

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

  • @anmolgupta2381
    @anmolgupta2381 4 ปีที่แล้ว +1

    8/10

  • @sadafnaeem3703
    @sadafnaeem3703 4 ปีที่แล้ว +2

    Best channel to learn the concept of CS 👌👌

  • @muhammadarith685
    @muhammadarith685 6 ปีที่แล้ว +1

    Sir Please Complete the Syllabus...😧😧😧

  • @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

  • @koinahotahai
    @koinahotahai ปีที่แล้ว +1

    Notes?

  • @arunkumarr2302
    @arunkumarr2302 4 ปีที่แล้ว +2

    Super 👌🏻👌🏻👌🏻👌🏻

  • @raghut720
    @raghut720 2 ปีที่แล้ว +1

    Thanks!

  • @ritikshrivastava9442
    @ritikshrivastava9442 4 ปีที่แล้ว +7

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

  • @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😊

  • @ethicalhacker5103
    @ethicalhacker5103 6 หลายเดือนก่อน

    7 right and 4 are wrong my answer

  • @Ravikumar-gj6qw
    @Ravikumar-gj6qw 4 ปีที่แล้ว +1

    Very useful tq bro

  • @mandeepsingh8836
    @mandeepsingh8836 4 ปีที่แล้ว +1

    i got 8 .

  • @balajiramasamy2152
    @balajiramasamy2152 4 ปีที่แล้ว +1

    ur teaching that perfect congrats

  • @xprostories5047
    @xprostories5047 6 ปีที่แล้ว +2

    Am impressed