Recursion in C

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

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

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

    This is the channel for which i pay my Wifi bills!!!!!!!!!!!!!!!
    Theser the types of channels that need to be supported
    this channel helped me a lot in 4th,5th and 6th sem subjects
    Thanks a lot!!!!!!!!!!!!

    • @rahulsingh-lv5xp
      @rahulsingh-lv5xp 5 ปีที่แล้ว +4

      3rd semester also from where you learn dld

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

      This channel helps 1st semester also senior brothers.

    • @AR-iu1fs
      @AR-iu1fs 4 ปีที่แล้ว +8

      Yes and we can support Neso Academy by subscribing to channel, giving likes to every video of the course and by recommending neso academy to our friends. Also by following them on social media

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

      Hi

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

      So true man

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

    Fun4 = 7 + fun2
    Fun2 = 7 + fun0
    Fun0 = 1
    Fun4 = 7+7+1 = 15

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

      Bro its wrong

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

      @@muhibosmani4838 No, he is write output is 15

    • @shrirangjoshi6981
      @shrirangjoshi6981 4 ปีที่แล้ว +18

      It's right

    • @davidecheagaray2256
      @davidecheagaray2256 4 ปีที่แล้ว +35

      What I'm wondering is the 7+7
      Fun 4 runs false
      Fun 2 runs false
      Fun 0 is true so it returns 1
      Just so I'm clear that would be 7 from the first false, 7 from the second false, and one from the true making 15????

    • @jerujedesu
      @jerujedesu 4 ปีที่แล้ว +102

      @@davidecheagaray2256 no, when n=0 then it returns back to the caller, which is fun(2)...then fun(2) becomes 1. 7+1=8 and return 8 returns back to the caller which is fun(4)...7+8 is 15 and that is the end and the output :)

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

    Generally, I only concern with my own business, BUT after watching your videos duh, I couldn't stop myself from commenting and appreciating you guys. You have been doing such a fantastic job; your channel must deserve appreciation and recognition from all over the globe. Thank you very much for providing such quality content.

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

    Ans 15
    fun(4)
    return 7+fun(2)//15
    return 7+fun(0)//8
    return 1//1
    Output - 15

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

      yes its 15
      fun

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

      @34. Pragati S fun(2) is replaced by their previous return value 8..so it will return 7+8

    • @techtipsinkannada2.035
      @techtipsinkannada2.035 3 ปีที่แล้ว +1

      How return 7+fun(2) = 15 can you elaborate

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

      @@techtipsinkannada2.035 fun(2)=8
      Return 7.
      Return 7 + fun(2)
      7+8
      =15

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

      @@techtipsinkannada2.035
      here fun(4) = return 7 + fun(2) //7+8
      where fun(2)=return 7 + fun (0) //7+1
      where fun (0) = return 1 // at which the "if" condition is true

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

    Am a kind of person who was afraid of coding, but after watching Neso academys course, i feel confident enough to do programming.
    Its really really the best tutorial of C :)

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

    Output - 15
    I was scared about this topic, and I wasn't able to understand it.
    You made it so easy. Thanks a lot NesoAcademy.

  • @mickeyvirus4584
    @mickeyvirus4584 6 ปีที่แล้ว +71

    Neso academy..... Doing very appreciating effort to learn us computer science..... Let me say value of effort..... This means alot to me..... My exams are coming.... M learning toc tutorial from NA.... Guys very appreciating tutorials video..... Thanks alot..... We should keep support neso.... Love you sir..... 😃

  • @Arriction
    @Arriction 4 ปีที่แล้ว +17

    c) 15 , n=4 return 7+fun(2)
    n=2 ,return 7+fun(0)
    n=0, return 1
    7+7+1=15

  • @swapnilsamanta5196
    @swapnilsamanta5196 4 ปีที่แล้ว +11

    Forget Coaching Institutions... Forget Tutorials....
    The Content U will Get From TH-cam and Channels like *NESO ACADEMY* are Mind Boggling...❤️❤️
    Thank you Neso Académie... I don't want Programming Certificates by Going to Coaching class.. I want pure Knowledge.. And u supplying it FREE OF COST.! for us. Is only an act of Kindness and sharing knowledge. 😊😊🙏❤️❤️❤️❤️..
    May ur Channel live for Ages....

  • @ayushiydvKG
    @ayushiydvKG 10 หลายเดือนก่อน +2

    neso hai toh mumkin hai!! u guys r legit gem!! loveee

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

    I've been struggling with the concept of recursion for the past two days. But after seeing this video, I can say that I have learned it very easily and quickly. Thank you sir for the great explanation.

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

    In Future A Lot Innovations would be due to this channel...

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

    result= 15
    return 7 + fun(2) =7+8 = 15
    return 7+ fun(0) = 7+1 =8
    return 1

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

    I have gone through a lot of youtube videos, but your tutoring in c is the best. Keep up the goodwork

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

    Option c. 15
    fun(4) -> return 7+fun(2) -> return 7+fun(0) ->return 1
    fun(2) = 7+1 = 8
    fun (4) = 7+8=15
    output = 15

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

    THE BEST EXPLANATION OF RECURSION TOPIC ON WHOLE TH-cam...RIGHT NOW!!!!WITH BEST ILLUSTRATION OF STACK DIAGRAM ...
    THANKS SIR !🤗😇🙌🙌🙌🙌🙌

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

    I was having a hard time understanding this lesson, I just couldn’t understand even I kept on watching and reading. But then I saw this, it help me visualize everything. Thank you so muchh! Your tutorial’s the best :>>

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

      True

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

      The fact that you wear a face mask to take a picture of yourself, is proof for insufficient IQ.
      Maybe you should learn stuff that's more suitable to your abilities, like mopping floors or bagging groceries at Walmart.
      It will save you a lot of frustration.

    • @sathish5470
      @sathish5470 2 ปีที่แล้ว

      @@iGavid_Doggins bruh what

    • @iGavid_Doggins
      @iGavid_Doggins 2 ปีที่แล้ว

      @@sathish5470 What part of my comment didn't you understand?
      I meant what I said!

    • @sathish5470
      @sathish5470 2 ปีที่แล้ว

      @@iGavid_Doggins why are you rude ?

  • @True_Sachin21
    @True_Sachin21 5 หลายเดือนก่อน +3

    First iteration:- int n = 4 ,
    If case is false so , we return 7+fun(n-2) -> 7+fun(2) ;
    Than pass int 2 so iteration will be 7+fun(0) , fun 0 will return 1 and we get 7+1 = 8 the value of fun(2) and final answer will be 7+8 = 15.

  • @mubarakhamza7141
    @mubarakhamza7141 4 ปีที่แล้ว +43

    I love this tutorial , it's way better than payed courses on some other sites

  • @manojkumarjmmanojkumarjm6418
    @manojkumarjmmanojkumarjm6418 4 วันที่ผ่านมา

    I am trying to understand the Recursion from 1 day but after seeing this video i easily understand the Recursion, Thanks for explaining the difficult topic in a simple way

  • @hans-erikstenby9920
    @hans-erikstenby9920 4 ปีที่แล้ว +3

    before i found this channel i coud not see how i was going to pas my exsam i december., but now i i my hope back. even throu i have used one day to just remeber all of what he is explaining the same way, i gues i have underston allot in c programing for my tasks that i have to deliver.

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

    This is the advantage of learning from a GATE aspirant..
    He will take u to the depths of the topic 🙏🙏🙏🙏

  • @abdul92643933
    @abdul92643933 4 ปีที่แล้ว +46

    I had a very hard time wrapping my head around recursion, definitely not after this video.
    Thank you sir!

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

    OMFG I FINALLY understood the recursion after browsing 17 different videos and articles, this explanation finally hit it home. It's not actively changing the function, it's merely putting the old calclation on hold until it can figure out all of thew parameters for it. Thank you so much!

  • @AmitMishra-dz3bx
    @AmitMishra-dz3bx 10 หลายเดือนก่อน +3

    If n is equal to 0, it returns 1.
    Otherwise, it returns 7 plus the result of calling fun(n - 2).
    In main, the fun function is called with the argument 4. So let's trace through the function calls:
    fun(4) calls fun(2) and returns 7 + fun(2).
    fun(2) calls fun(0) and returns 7 + fun(0).
    fun(0) returns 1.
    So, fun(2) returns 7 + 1 = 8.
    fun(4) returns 7 + 8 = 15.
    Therefore, the output of the program will be 15.
    😇😇

  • @julian3400
    @julian3400 10 หลายเดือนก่อน

    Best explanation on Recursion i've watched so far. Have taken CS50 and my universities slides, but still didnt get it. This is my second video on youtube and I finally understand it! Thank you so much

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

    The way you teaching is awesome. And it's crystal clear!
    Thanks a lot!!!
    The answer is 15.

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

      Bro I want to know the code for finding 2nd highest no. In a given integer..example 56879 in this value we have to find the 2nd highest no.

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

      @@ezhilv4358 I will tell you

    • @ezhilv4358
      @ezhilv4358 4 ปีที่แล้ว

      @@arunaagt8229 thank u .but can u give me within today?

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

      @@ezhilv4358 //finding second largest number by comparing difference
      #include
      int main()
      {
      int n,large=-32768; //-32,768 is the smallest integer in c
      printf("Enter an integer:
      ");
      scanf("%d",&n); //Getting user input
      int y;
      y=n;
      int x;
      x=n; // Here i am assiagning n value into x for process.. so that the given value won't change further
      while(n>0) //it checks whether n having a digits. if condition is true, loops gets execute
      {
      x=n%10; //Taking last digit
      if(large>>>>>>>>UPTO THIS YOU FINDING A Largest NUMBER>>>>>>>>>>
      //>>>>>>>HERE YPU GONNA FIND 2ND LARGEST NUMBER>>>>>>>>>>>
      int Actual=32768; // it is for finding difference
      int second_large,difference,z;
      while(y>0) //here you taking a given value as it is like 123
      {
      z=y%10; //here first time z value is 3 then 2 then 1
      if(large==z) //here you comapring 3 with 3 ,and 3 with 2 ,and 3 with 1
      {
      //do nothing..
      }
      else
      {
      difference=large-z; /
      if(Actual>difference)
      {
      Actual=difference;
      second_large=z;
      }
      }
      y=y/10; //first time -- 123/10; 2nd time -- 12/10; 3rd time-- 1/10;
      }
      printf("second_large number is:%d

      ",second_large);
      /* logic: I am comparing difference with largest value .. here 3 is largest.. so everytime i am taking difference. 3-3 do nothing; then 3-2 =1 ,the 3-1 = 2; HERE 1 IS THE LEAST VALUE ,SO IT PRINT CORRESPONDING VALUE THAT IS ------------2-----------
      return 0;
      }
      /* HERE IS THE SAMPLE OUTPUT:
      Enter an integer:
      45678
      Largest number is:8
      second_large number is:7
      */
      Hope you can understand.

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

    This is the first video I have ever watched from your channel on one of the topics that has eluded me the most in programming. In 7 minutes you have explained something that for years I haven't been able to comprehend fully. I don't know how to thank you but one day I might make a contribution to some open source program and I will credit you if I use recursiveness. I absolutely loved the way you showed it so clearly with the stack diagram. When you said it's not rocket science you would not believe my huge smile at that moment because that's exactly how I felt! Thank you to the narrator and everyone involved in this channel!!!

  • @dikshakatake5739
    @dikshakatake5739 4 ปีที่แล้ว +17

    Channel like yours encourages me to learn everything from TH-cam ! Your efforts are seen ! Truly AWESOME ! THANKYOU SO MUCH !!!!🙌🙌

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

    I guess this is the best explanation of recursion so far, even cs50 couldn't explain it better !

  • @rothenbergt
    @rothenbergt 6 ปีที่แล้ว +10

    Was learning recursion last night. What a pleasant surprise. Great video as always!

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

    I didn't know what recursion was, I watched this video, and I instantly understand it, a really good video.

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

    thank you so much neso academy i have understand this actual logic of recursion after 2 years😀😀🤣🤣😅😅

  • @muhammadasghar9829
    @muhammadasghar9829 11 หลายเดือนก่อน

    this is the best possible way in which recursion could've been taught grateful to find this video thanks a lot!!!

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

    This is best c programming tutorial on over youtube

  • @noodlechan_
    @noodlechan_ ปีที่แล้ว

    This is the best channel to learn C programming language. Just before I was struggling in trying to learn and understand how to make linked lists, I learned just by watching those videos.

  • @praveenpatel9972
    @praveenpatel9972 6 ปีที่แล้ว +71

    C. 15
    7 + fun(2)
    7+fun(0)
    fun(2) = 7+1
    7+7+1 = 15

    • @beingaware43
      @beingaware43 6 ปีที่แล้ว

      How to calculate value of function 2?

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

      @@beingaware43
      fun(2)=7+fun(2-2)=7+fun(0)
      7+1
      fun(2)=8
      Here fun(0) returning value 1, thats why fun(2) returns 8.

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

      @@praveenpatel9972 1st call fun(4) =7+fun(4-2) =7+fun(2)
      Again fun(2)=fun(2-2)=7+fun(0)=7
      How the calculation to get answer is 15 please explain

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

    That Method 2 man..!!
    I don't know why I have been struggling to understand this simple thing until now
    Best Explaination I Have Ever Heard

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

    Finally understood recursion , thank you man. I watched different videos on this topic and managed to get bits and pieces about recursion from each of them. But when I finally watched your video, everything just clicked.

  • @Mahi143-g3x
    @Mahi143-g3x 2 ปีที่แล้ว

    Super sir I have confusion of recursion since my B.tech 1st year now I am in final year and solved my confusion TQ you cheers : )

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

    Neso academy you guys are doing awesome... I am fresher in CSE and recursion for fresher is tough.. but you guys mske it interesting and easy.. Go on!!🤘

  • @suyashkhandare7368
    @suyashkhandare7368 2 หลายเดือนก่อน

    HOMEWORK - I solved it by both methods and got the answer which is 15. Thank you Neso Acade

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

    now i can understand the the relationship between the caller and the return. it was not clear, thank you Sir! :)

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

    Hor dasso kiniya tarriffa chaidiya tennu.....😁
    thanks Alot Sir🙏

  • @RameshKumar-yk4kl
    @RameshKumar-yk4kl 5 ปีที่แล้ว +6

    Thank you very much much simply superb explanation.
    Ans is C)15.

  • @KevinPhilip777
    @KevinPhilip777 ปีที่แล้ว

    Holy shit, dude, I had no idea how tf recursion worked until I saw your video. God bless.

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

    Finally I understand recursion & every aspect of it. Thank you..!!!

  • @joshnathanielarcilla6127
    @joshnathanielarcilla6127 ปีที่แล้ว

    I've been doing for loops to get a value and recursion makes my life more efficient bro. Thank you very much 😭😭😭

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

    Owowwwwwwww!!! I get it now! Thank you soooooo much! First time saw your channel and you made me understand recursion( which made my head spin around) in one go. I subscribed right away. Thanksalot👍

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

    i cant believe recursion is so easy after i saw the video...very good explanation...thank u so much sir

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

    Thank you for the video.
    It helped me understand the recursive function used in Towers of Hanoi!

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

    Literally, I have seen many videos, but you people have explained the best , thanks..

  • @toufik6442
    @toufik6442 4 ปีที่แล้ว +32

    I love that sentence "recursion is not the science of rocket", we always say this sentence in Algeria to express simplicity of something hhhhhhh

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

      In india we also say , "There is no rocket science".

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

      1 2 3 viva algerie ههههههه

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

    Thx indian guy!
    Hugs from Brazil!

  • @VISHALSHARMA-bf4ol
    @VISHALSHARMA-bf4ol 5 ปีที่แล้ว +8

    THIS IS THE BEST CHANNEL FOR LEARNING
    ALSO ANS IS 15

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

    first of all thanks so much , I couldn't understand recursion last 3 days after learn recursion but after some search . I am here and understand actually how recursion work step by step . again thanks a lot brother.

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

    I can understand the topic literally after 2 months -,- THANKUUU

  • @edm-jt2gy
    @edm-jt2gy ปีที่แล้ว

    wow, many thanks for the author of this videos, now i understand how recursive works, u explain it very well, thank you

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

    This channel is amazing. clear speaking and good graphical representation

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

    one of the best recursion video on youtube

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

    God bless you man!!
    I was looking for this kind of explanation.
    many many thanks👍👍👍

  • @zouhairsahtout9682
    @zouhairsahtout9682 7 หลายเดือนก่อน +1

    fun(4) => 7 + fun(2)
    fun(2) => 7 + fun(0)
    Now the function going to starts unwinding, basically going backwards:
    fun(0) => [1]
    fun(2) => 7 + [1] : (replace the returned value from fun(0), which is 1)
    fun(4) => 7 + [8]: (replace the returned value from fun(2), which is 8)
    Finally the function will returned the value 15, and then will pop up from the stack.

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

    Thanks a lot for explaining this topic in such a simple way. When I first learnt recursive functions, I couldnt understand it but now i do, because of you.

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

    Mad love from China, i actually threw my actual teacher's explanation out of the window after seeing this 😍❤️
    The Answer is 15, without breaking a sweat.

  • @diwakarkumar9835
    @diwakarkumar9835 4 ปีที่แล้ว +6

    Your way of teaching can help me a lot to understand the complex topic in a easier way

  • @rodwynnejones
    @rodwynnejones 4 ปีที่แล้ว

    wow...thank you...struggled to understand recursion...so I gave up initially.....some time later, I knew it was something I needed to understand...now... thanks to you...I now get it, thank you again.

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

    I love ur teaching so much If u can be our teacher we will be best engineers😊

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

    Best explanation of working of recursion yet on TH-cam 👍👍

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

    15 is the answer. please tell me I am right or wrong.

    • @GauravYadav-sl8vc
      @GauravYadav-sl8vc 2 หลายเดือนก่อน +3

      U are right

    • @shovonanand023
      @shovonanand023 หลายเดือนก่อน +2

      Yes cz 2 times called..
      7+7+1=15

    • @calmboi6457
      @calmboi6457 หลายเดือนก่อน +2

      you are right or wrong

  • @vigotech9995
    @vigotech9995 2 ปีที่แล้ว

    I have been able to solve recursive problems in C because of the approach taught in this video, Thank you so much.

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

    15
    SOLUTION :=
    (SEE FROM BOTTOM TO TOP)
    7+fun(2) // 7+8
    then
    7+fun(0) // 7+1
    so
    . ' . fun(0)=1

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

    I think we all agree that there should be a international day where we honor all the Indian people on youtube that explain us code, when we don't understand it

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

    Thank you Neso Academy, you helped me to understand this concept

  • @LINA-tf8yi
    @LINA-tf8yi 3 ปีที่แล้ว +1

    it's really fascinating how good you explain and how clear u make concepts,

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

    Good explanation.
    Good visuals.
    Easy to understand.
    Thank you very much.

  • @davidwebdeveloper
    @davidwebdeveloper 2 ปีที่แล้ว

    You are a best teacher for programming. I was never seen before this kind of explanation. I am before learned udemy, corsera and so on. But nothing is better than you sir!. This course motivated "how to learn deep into the subject."
    I am search many times in Google who is the instructor? Anyone know the instructor please reply to me

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

    15 is the output 🤟
    Fun 4=return 7+fun2
    Fun 2=return 7+fun 0
    Fun 0= 1
    Fun 4= return 7+return 7 + fun 0 (7+7+1=15)

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

    Thanks sir ...such a excellent explaination sir , I never understand recursion before...and each and every concepts that you explain are very easy to understand...

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

    wow!!! what an excellent explanation good job!

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

    This is by far the best video about recursion on youtube.

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

    This is unbelievably helpful...
    ... Right?
    Right!

  • @singstarrahul
    @singstarrahul 2 ปีที่แล้ว

    yes 🙌 some relief to me after understanding recursion and required practise .

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

    Simplified and thorough. Thank you so much!

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

    Ive watched more than 5 tutorials and this one was hands down the best one.
    finally at last i was able to understand this satanic topic.
    think im gonna cry. but foreal tho, thanks alot.

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

    God bless this channel. Thank you sir :)

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

    The function fun is called with an argument of 4. Since 4 is not equal to 0, it goes to the else part and returns 7 + fun(2). Now, fun(2) will again return 7 + fun(0). Finally, fun(0) returns 1. So, the total becomes 7 + 7 + 1 = 15.

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

    Thank you very very much. You are just awesome and made my day. It was so easy to understand the way how i learnt recursion. Along with that it helped me to visualise the stack as well :)

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

    this is best channel for Cs and the way sir explain is next level

  • @SudilHasitha
    @SudilHasitha 6 ปีที่แล้ว +4

    ans c) 15
    fun (4)
    return 7+fun (2)
    return 7+fun (0)
    return 1
    then
    return 1
    go to
    return 7+1
    go to
    return 7+7+1
    go to
    fun (4) at main
    giving 15 as answer

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

    Take love neso academy.❤️

  • @alvaaritro8285
    @alvaaritro8285 ปีที่แล้ว

    badly needed a deep explanation of recursion... thanks!!!

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

    U are doing great work.

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

    world's best COMPUTER SCIENCE teacher

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

    Great full to you guys done awesome job 😍😍😍 kudos to the expliner and the best slide maker 😎😎 looking forward many more videos on cpp and c

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

    my mind is blown. crazy stuff! thanks for sharing!

  • @subhankarsahoo3708
    @subhankarsahoo3708 4 ปีที่แล้ว +16

    fun(4)
    |
    return 7 + fun(2) // 15 [value of fun(4)]
    |
    return 7 + fun(0) // 8 [value of fun(2)]
    |
    return 1 // value of fun(0)
    So the final answer is 15.

  • @chandrapalrajput2276
    @chandrapalrajput2276 2 ปีที่แล้ว

    Your contain is so high level even a child can understand what are you teaching it's amazing👍 Thank you very much from my heart❤

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

    You guys are gem.The way of teaching is amazing ,even though I thought I knew recursion but after coming here I came to know that I had understood recursion in a wrong way espicially that stack thing was amazing ...May your channel grow and grow and grow.....Gud luck..

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

    this channel is pure gold!

  • @andersonsoaresduclos
    @andersonsoaresduclos 4 ปีที่แล้ว +14

    Obrigado, pela aula. Excelente explicação 🙏🏻