Scope of Variables - Local vs Global

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии • 161

  • @arpansarkar7924
    @arpansarkar7924 5 лет назад +50

    This channel needs more subscriber. Great videos thanks Neso Academy.

  • @chinigepallieswarsaikumar7588
    @chinigepallieswarsaikumar7588 5 лет назад +14

    This channel is God fo me in programming as a beginner

  • @RehanZukhi
    @RehanZukhi 3 года назад +86

    Only when i was breakin down everyday because i felt i will fail in c programming, my lecturer shared this playlist, and now i am aiming to excel instead of just passing the test.
    Thanks Neso Academy!

  • @astasuleo
    @astasuleo 5 лет назад +28

    this is the best series of C explaination ever. Please keep it up. Im trying to help this channel by sharing it everywhere i can. I'm a newbie for C in PIC using MPLAB. I wish in the near future, you could be able to have time for making videos based on C in PICs.

  • @vaishnavimendre469
    @vaishnavimendre469 5 лет назад +22

    All videos are very great!!! Thank u sir

  • @eshikakumari9199
    @eshikakumari9199 4 года назад +46

    Incredible explanation...

  • @javaexpertsa8947
    @javaexpertsa8947 6 лет назад +11

    You explain it so good, i just love this youtube channel, wish i had found it earlier!

  • @poojaheera7658
    @poojaheera7658 4 года назад +10

    The explanation is just perfect thanks alot sir 🙏

  • @jasminesheik3497
    @jasminesheik3497 5 лет назад +10

    This vedio deserves lots of likes. The best ever vedio 😊

  • @ridmasathsarani7468
    @ridmasathsarani7468 3 года назад +4

    6 hour lecture content in 11.11 mins. Great work and Thank you!

  • @kommsk
    @kommsk 3 года назад +4

    Wonderful...it starts to clear up in my brain all that confusing concepts of why, how... please keep up

  • @Jkt61205
    @Jkt61205 4 года назад +6

    this channel is god for me and all of the persons who are watching these videos,this channel needs at least more than 1 million subscribers,Believe me he teaches EXTRAORDINARILY;he teaches EVERY POINT.THANK YOU SO MUCH SIR.

    • @hetaeramancer
      @hetaeramancer 3 года назад +1

      ikr, he's literally the best C programming language teacher i'd ever come across.

    • @Jkt61205
      @Jkt61205 3 года назад

      @@hetaeramancer yes, it's true

  • @nagamadiki6313
    @nagamadiki6313 3 года назад +4

    Wow what a explanation...
    Never before ever after, take a bow🥰

  • @swatikumari6691
    @swatikumari6691 3 года назад +2

    Well explained, Clear Concept and too much helpful for those students who are trying to learn c programming.Thank you so much sir for this video

  • @jarjarbinks9937
    @jarjarbinks9937 2 года назад +1

    at 6:25 the two variables in the second case have different addresses so that actually makes it two different memory locations. However in the first case can it not be interpreted as changing the variable rather than it's redefinition because when applying a loop, and over multiple iterations the value of the variable might be changing but that isn't interpreted as the redefinition of the function.

  • @alfredchilini5518
    @alfredchilini5518 5 лет назад +4

    Neso Academy u r the best in the field good job guys

  • @MarkusEicher70
    @MarkusEicher70 9 месяцев назад +1

    Hello Jaspreet, hi Neso Academy. I highly appreciate your commitment to free education and I am very thankful for your high quality content. I followed the playlist C Programming and Data Structures from the first video on, and it is one of the best, if not the best introduction series I saw till this point. Many thanks and may you be blessed and I wish you much success with finding a way to get compensated for your valuable efforts. I will try to contribute with what ever I can to help keeping this channel alive for learners.

  • @brijusingh845
    @brijusingh845 4 года назад +1

    Wow... Sir..... Clear crystal !!!! Concept.... God bless you

  • @learncode6952
    @learncode6952 3 года назад

    After searching lots of garbage stuff I found this course was very much helpful

  • @parhaimowarson2503
    @parhaimowarson2503 2 года назад +1

    Thank you, Neso Academy for your incredible explanation.....

  • @parthshiroya4436
    @parthshiroya4436 4 года назад +4

    Exactly what i was looking for !!

  • @dominiquedevries9972
    @dominiquedevries9972 4 года назад +3

    Wow it,s very detailed.
    Thank you!!!

  • @zandewilson
    @zandewilson Год назад

    Very helpful. Thanks

  • @bhramastraaa9391
    @bhramastraaa9391 Год назад +1

    Though it wasn't a video fully on functions, but I cleared all my doubts about function.

  • @johnsonmediaprod3239
    @johnsonmediaprod3239 9 месяцев назад

    This is a question of my class discussion, so you have well explained that and clarified that . Great job

  • @yuwendridesilva6956
    @yuwendridesilva6956 3 года назад

    I donno how the hell I decided to save this playlist on You tube not knowing this is gonna be a GOLDEN playlist.👑👑👑👑👑

  • @Aerish369
    @Aerish369 2 года назад

    Thank you Neso Academy for this informational video.

  • @saichintada4471
    @saichintada4471 3 года назад +1

    Thank u so much for your understandable and good explanation neso academy 😘😘

  • @dedeepya2611
    @dedeepya2611 4 года назад +2

    Just awesome....easily understandable 🙏

  • @mitthu5076
    @mitthu5076 3 года назад +2

    Thanku sir ❤
    you are global variable😊😊.... Cause we all are able to reach you without any offline classes

  • @shahfaisal7760
    @shahfaisal7760 4 года назад +3

    Thanks A Lot Sir❤️ ...It helped me out 👍

  • @salonisrivastava5527
    @salonisrivastava5527 4 года назад +3

    What an explanation man👍👍
    Very nice😊

  • @AbhishekKumar-zw5cd
    @AbhishekKumar-zw5cd 5 лет назад +2

    sir mind blowing concept

  • @jatinrawat7415
    @jatinrawat7415 2 года назад

    Just Perfectly Exaplined !!!! Amazing

  • @narsimhareddy4742
    @narsimhareddy4742 4 года назад +2

    Can anyone explain me last example?
    int var = 3; is inside int fun(),so how it is called global variable?

  • @tarjunrao8823
    @tarjunrao8823 3 года назад

    Love of explaination from india

  • @Ashishrajcreations
    @Ashishrajcreations Год назад

    Greatly thankful sir for your large effort in explaining c language in detailed and depth .

  • @ichaa3tech
    @ichaa3tech 5 лет назад +2

    This course is better than all the paid courses

  • @silosizodube4881
    @silosizodube4881 3 года назад

    Explanation soo clear

  • @adithya817
    @adithya817 2 года назад +1

    Best explanation

  • @teetole472
    @teetole472 Год назад +1

    Ek dum chakaas👌👌

  • @TheFeralEngineer
    @TheFeralEngineer 3 года назад

    So glad i found these videos

  • @suryakilaparthikilaparthi5763
    @suryakilaparthikilaparthi5763 3 года назад

    Sir, thank you soo much. I am searching for a right video that I could understand. In this process I came through ur video sir with a clear cut explanation. Thank you so much sir.

  • @paintinginsanes3515
    @paintinginsanes3515 2 года назад

    Really great explanation

  • @sairuthwikbandari9730
    @sairuthwikbandari9730 2 года назад

    Thanks a lot for neso academy awesome explaination

  • @infinitei6539
    @infinitei6539 3 года назад

    you told that main function is the starting part of the program and there's another function fun??
    please explain

  • @tayyab.sheikh
    @tayyab.sheikh 11 месяцев назад

    Pure concepts!

  • @sandeepmishra3972
    @sandeepmishra3972 5 лет назад +1

    At 10:52..why do we need to call that function [ fun()] in int main function

    • @kunalk5806
      @kunalk5806 4 года назад

      so why we are calling the function fun() in int main function is that because the function fun() outside the int main function gets executed..Thats why it prints output 10 in fun()

  • @porankirajkumar4709
    @porankirajkumar4709 4 года назад

    Sir why the function fun() doesn't print the global variable if we don't call the fun in the local variable??

  • @AbdulkerimJemal-tc6mn
    @AbdulkerimJemal-tc6mn 6 месяцев назад

    The example mentioned in the video says that we cannot enter another var that will make an error but as we learned in itialization of variable that we can change the var and am a little bit confused with it can u explain for Please ????

  • @natureandtech09
    @natureandtech09 3 года назад

    Sir you said that if we trying to acess a variable in internal block we can access the contents of outer block also so sir in output question 5:20 why the internal block print 4 as a output as we can see it.can access outerblock var and gives erorr due to redifinition of var because internal block can access outer block information plz explain sir

    • @HasnainKhan-jj5fb
      @HasnainKhan-jj5fb 2 месяца назад

      If you get the answer explain it to me also

    • @SreeRahul-x4w
      @SreeRahul-x4w 9 дней назад

      That is because,always a function will first look for the variable defined within its block .only if it is not defined anywhere inside it's block,the outer blocks are checked

    • @SreeRahul-x4w
      @SreeRahul-x4w 9 дней назад

      Here,the function find the variable of value 4 within it's block.So 4 is printed .If the variable is not defined inside the block then 3 will be printed

  • @anand-Nov28
    @anand-Nov28 Год назад

    ISO must certify this person is 100% genuine

  • @dimplejain7226
    @dimplejain7226 6 лет назад +2

    excellent videos!!!! Best teacher ...

  • @vakhariyajay2224
    @vakhariyajay2224 3 года назад

    Thank you very much. You are a genius. 👍👍🔝🔝

  • @bmfahim7321
    @bmfahim7321 3 года назад

    Great explanation, Thank you

  • @namanjain4237
    @namanjain4237 2 года назад

    Bhaiya pehle global variable print hoga ya bracket ke andar wala??

  • @manumahi4180
    @manumahi4180 3 года назад

    When we have to use %d
    ,and only %d.we are giving here two integers right then what is the difference

  • @sayanstrsc.7272
    @sayanstrsc.7272 4 года назад

    ? I used to know that a program is executed from the main function. Then how is the variable created before the start of execution of main function?

  • @arjumandvillagelife
    @arjumandvillagelife 3 года назад

    wonderful👍👍
    great🌷

  • @sruthimajhi5610
    @sruthimajhi5610 2 года назад

    Great one sir!👍🏻

  • @kammaganisricharan5850
    @kammaganisricharan5850 3 года назад

    Tq sir 🙏🙏

  • @opst1704
    @opst1704 5 лет назад +2

    scope != lifetime
    just look at static local variable, scope : function
    lifetime : program runtime

  • @Just-imagine-iff
    @Just-imagine-iff 2 года назад +2

    What's the difference between %d/n and only %d

    • @AnoopTripathi-n3g
      @AnoopTripathi-n3g 27 дней назад

      Bhai next line ki difference hai bs ( %d
      )
      se next line aa jati hai

  • @kunnudev7250
    @kunnudev7250 2 года назад

    Great job please continue awesome videos salute to you

  • @javierparrauriostegui1413
    @javierparrauriostegui1413 4 года назад +1

    Great video! New sub!

  • @Beatzz555
    @Beatzz555 3 года назад

    Thank you sir😌

  • @shashanksrivastava4716
    @shashanksrivastava4716 5 лет назад +2

    Sir, Please upload the notes in PDF format on the website.

  • @sakaldev4041
    @sakaldev4041 3 года назад

    Thanks for this content.

  • @v8wr253
    @v8wr253 2 месяца назад

    Thank you so much

  • @zakirahimi7924
    @zakirahimi7924 9 месяцев назад

    the scope of a variable is not its lifetime. scope is the accessibility or visibility of a variable to other parts of a program. lifetime is the time between the creation of a variable and death of the variable, so a variable may be alive in the program but not accessible. (keep up the great work, your content is very very structured.)

  • @gramps717
    @gramps717 2 года назад

    very well explained goodddddd for uu

  • @mateuszlukaszczyk5359
    @mateuszlukaszczyk5359 4 года назад

    Thanks for the great content.

  • @Therockingww
    @Therockingww 3 года назад

    awesome video !!

  • @sreesen3159
    @sreesen3159 Год назад

    How to access the global variable in a function which has a variable of the same name as the global variable

  • @md_daud
    @md_daud 2 года назад

    Thank you!!!

  • @harsh9558
    @harsh9558 3 года назад

    Sir helped a lot!!

  • @reshma4768
    @reshma4768 4 года назад +1

    Sir, please upload a full course on python programming also

  • @starman511
    @starman511 5 лет назад

    Very helpful video, thank you!

  • @mrnaveen6791
    @mrnaveen6791 2 года назад

    osm explanation....

  • @Aditya-it9jt
    @Aditya-it9jt 3 года назад

    Where did i find these notes?

  • @nitinchinmay260
    @nitinchinmay260 3 года назад

    i am getting an error which says '1d returned exit status'

  • @shefatabassum5807
    @shefatabassum5807 2 года назад +1

    Calling a function means we are transferring the control from this to that function

  • @Pritamdas-bg7fp
    @Pritamdas-bg7fp 6 лет назад

    good explanation....thank u sir

  • @naveenkumar-zo1cj
    @naveenkumar-zo1cj Год назад

    Wonderful

  • @stephen9673
    @stephen9673 3 года назад

    My output was 4 and 4, not 4 and 3. Any explanation of why?

  • @priyanshigarg5728
    @priyanshigarg5728 6 лет назад

    Sir,, What is the lifetime of a dynamically created variable???

  • @mummadiamrutha8624
    @mummadiamrutha8624 6 месяцев назад

    %d is nothing but storage of variable and
    is used to print value in next line

  • @logadharani5132
    @logadharani5132 4 года назад +3

    9:17 ...very bull ...lol
    you're amazing man, I have exams in 3 hours!

    • @sudev216
      @sudev216 3 года назад

      That's what we expect from us
      Last minute study OP

  • @shubhampedhe874
    @shubhampedhe874 3 года назад

    what is difference in "%d/n" and "%d"?

    • @bzero7857
      @bzero7857 2 года назад

      %d is format specifier and
      is a newline character

  • @rushabshetty5092
    @rushabshetty5092 2 года назад +1

    osm teaching

  • @anshulbaurai664
    @anshulbaurai664 4 года назад

    Great video

  • @muskankumari1896
    @muskankumari1896 3 года назад

    What will happen if we don't call the function fun() ?

  • @tarikahmad4749
    @tarikahmad4749 2 года назад

    Where is the lec pdf? Anyone?

  • @amarnath8733
    @amarnath8733 3 года назад

    1st and 2 nd videos are missing in playlist please add this videos in playlist

  • @rakesh_007
    @rakesh_007 4 года назад

    Please put the captions

  • @md.mahaburrahmannadim233
    @md.mahaburrahmannadim233 3 года назад

    super content

  • @myhumblebeginnings
    @myhumblebeginnings 2 года назад

    Is it ok to write like this?
    int main()
    {
    I wonder, because you write it this way:
    int main() {

  • @cringentertainment2605
    @cringentertainment2605 4 года назад

    Sir Please make Lecture on C++👏👏

  • @DSCSNayanakb
    @DSCSNayanakb 5 лет назад +1

    Thank u sir. Pls upload such videoes on java