Scope of Variables - Local vs Global
Vložit
- čas přidán 9. 09. 2024
- Programming & Data Structures: Scope of Variables in C programming.
Topics discussed:
1. What is the scope of a variable?
2. Local variable.
3. Example of local variable.
4. Global variable.
5. Example of global variable.
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 #ScopeOfVariables
This channel needs more subscriber. Great videos thanks Neso Academy.
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!
hows it going now ?
।
😊
।
😊
K.a।।।
।।।।
।
।।
।
Incredible explanation...
Exactly
All videos are very great!!! Thank u sir
This channel is God fo me in programming as a beginner
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.
This vedio deserves lots of likes. The best ever vedio 😊
The explanation is just perfect thanks alot sir 🙏
You explain it so good, i just love this youtube channel, wish i had found it earlier!
6 hour lecture content in 11.11 mins. Great work and Thank you!
Have you become developer
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.
ikr, he's literally the best C programming language teacher i'd ever come across.
@@hetaeramancer yes, it's true
Wonderful...it starts to clear up in my brain all that confusing concepts of why, how... please keep up
Wow what a explanation...
Never before ever after, take a bow🥰
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
This course is better than all the paid courses
Neso Academy u r the best in the field good job guys
After searching lots of garbage stuff I found this course was very much helpful
Though it wasn't a video fully on functions, but I cleared all my doubts about function.
Exactly what i was looking for !!
Wow... Sir..... Clear crystal !!!! Concept.... God bless you
Thanku sir ❤
you are global variable😊😊.... Cause we all are able to reach you without any offline classes
Wow it,s very detailed.
Thank you!!!
Thank you, Neso Academy for your incredible explanation.....
I donno how the hell I decided to save this playlist on You tube not knowing this is gonna be a GOLDEN playlist.👑👑👑👑👑
This is a question of my class discussion, so you have well explained that and clarified that . Great job
What an explanation man👍👍
Very nice😊
Is it enough for placements ?
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.
Best explanation
Thanks A Lot Sir❤️ ...It helped me out 👍
Love of explaination from india
Thank u so much for your understandable and good explanation neso academy 😘😘
Just awesome....easily understandable 🙏
sir mind blowing concept
Thank you Neso Academy for this informational video.
ISO must certify this person is 100% genuine
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.
Thank you :)
Greatly thankful sir for your large effort in explaining c language in detailed and depth .
Just Perfectly Exaplined !!!! Amazing
Ek dum chakaas👌👌
Pure concepts!
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.)
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.
Very helpful. Thanks
Thank you, Sir
So glad i found these videos
Thanks a lot for neso academy awesome explaination
scope != lifetime
just look at static local variable, scope : function
lifetime : program runtime
osm teaching
excellent videos!!!! Best teacher ...
%d is nothing but storage of variable and
is used to print value in next line
Explanation soo clear
very well explained goodddddd for uu
Great explanation.
Thank you sir.
Really great explanation
Can anyone explain me last example?
int var = 3; is inside int fun(),so how it is called global variable?
Great video! New sub!
Great job please continue awesome videos salute to you
Thank you very much. You are a genius. 👍👍🔝🔝
9:17 ...very bull ...lol
you're amazing man, I have exams in 3 hours!
That's what we expect from us
Last minute study OP
Thank you!!!
osm explanation....
Wonderful
Thanks for this content.
Tq sir 🙏🙏
Sir, Please upload the notes in PDF format on the website.
Sir, please upload a full course on python programming also
Thank you sir😌
Great one sir!👍🏻
Thanks for the great content.
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
wonderful👍👍
great🌷
Sir helped a lot!!
Calling a function means we are transferring the control from this to that function
Very helpful video, thank you!
What's the difference between %d/n and only %d
you told that main function is the starting part of the program and there's another function fun??
please explain
good explanation....thank u sir
awesome video !!
Great
Great video
v helping
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 ????
Bhaiya pehle global variable print hoga ya bracket ke andar wala??
super content
Is it enough for placements ?
Thank u sir. Pls upload such videoes on java
? 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?
can we get pdf or written notes
Thanks
How to access the global variable in a function which has a variable of the same name as the global variable
When we have to use %d
,and only %d.we are giving here two integers right then what is the difference
Sir Please make Lecture on C++👏👏
Awesome guy.
Sir,, What is the lifetime of a dynamically created variable???
1st and 2 nd videos are missing in playlist please add this videos in playlist
Sir why the function fun() doesn't print the global variable if we don't call the fun in the local variable??
Thank u
Is it enough for placements ?
Please put the captions
At 10:52..why do we need to call that function [ fun()] in int main function
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()
Is it ok to write like this?
int main()
{
I wonder, because you write it this way:
int main() {
please add Computer organization videos also.