At 6:40, would variable b not be stored on the stack instead of the unitialised data segment since it is inside main() and the stack stores the local variables and function parameters of function calls?
Local variables are stored in stack segment on stack frame. But what if, its a static local variable? It wont be stored on stack since, the scope is local but the lifetime of the variable is during the execution of the code. So, It should be stored on Data Segment - BSS segment. I would like to know your thoughts on the same! Appreciate your input.
@@vijay10june can you please talk more about where the command line arguments will get stored in memory , the part that you called "Environment? thanks
In the first example you said the local variables go to the data section... In the second example you said the local variables go to stack.. I am confused here
Local variables if declared static then the scope is at functional block but, lifetime of variable is throughout the execution of program. Hence, static local variable is stored in Data Section & local variable are stoared in stack frame of function call in stack Section. 😊
I honestly feel this : every btech cse student must see this video.
Thanks a lot sir
ALMIGHTY bless you with all kinds of wealth
ya it's the best explanation so far on the videos I have watched about c memory layouts thanks
Amazing, love it!
Very good explanation ❤
Take Respect and Love 😍💖
Short + Simple + Clear + Understandable = Brilliant explanation thank you so much
Hats off to your explanation brother
very useful and simple explanation. thanks
Just what i need to know, no more and no less. a Must add subs list alligators.
Keep it up.
Thank you for the wonderful explanation.
Nice explaination
Very well explained!!
Thank u.. Great explanation
Very well explained 👌🏻👍
You are Excellent :)
Good explainnation tq
Best explanation ❤️
thanks sir very useful information for me. thanks a lot for this video.
Very well explained sir
Best explained
was useful
very helpful!
Thank you so much!
Perfect!
Very informative lecture, can u make more videos on pointers and data structures if possible
❤️🌸
At 6:40, would variable b not be stored on the stack instead of the unitialised data segment since it is inside main() and the stack stores the local variables and function parameters of function calls?
Realllly, you explained it very well!
Keep going...
Anyways, the audio quality was a bit of problematic, will sound good if it is fixed :)
Thanks!
6:30 you might have added somewhere whats the benefit of un- and initialized segments
Mic quality is so bad but thanks for content!
please check with compiler...
local variables are store in stack not in bss....
Local variables are stored in stack segment on stack frame. But what if, its a static local variable? It wont be stored on stack since, the scope is local but the lifetime of the variable is during the execution of the code. So, It should be stored on Data Segment - BSS segment.
I would like to know your thoughts on the same! Appreciate your input.
@@vijay10june can you please talk more about where the command line arguments will get stored in memory , the part that you called "Environment? thanks
How all that memory layers get splitted by paging and virtual memory segmentation ?
search for MMU unit in an application processor (for example broadcomm or nxp arm processor)
In the first example you said the local variables go to the data section... In the second example you said the local variables go to stack.. I am confused here
Local variables if declared static then the scope is at functional block but, lifetime of variable is throughout the execution of program.
Hence, static local variable is stored in Data Section & local variable are stoared in stack frame of function call in stack Section. 😊