This is a good effort, but I find this link a lot clearer "(255) C Programming Tutorial 1 : Memory Layout of a C / C++ Program : Think Aloud Academy - UA-cam"
@@vishalgulia3320 sir as u said initialized variables were stored in one region, uninitialized variables were stored in one region, recursions were stored in heap. my question is, would text segment store all the code or would it store the code except initialized, uninitialized varibale, recursion.
See the source code what we write in c gets compiled and it gets converted into.exe file and then when we run it gets address in the text segment area.
It's the assembly language form of our code. If you write code in C or any other high level programming language, the code gets converted to assembly language by the compiler. Assembly laguage consists of instructions and is just a binary form of the original code you wrote.
It depends. If it's a local const vaiable used by a method for example, it would be in the program stack since it's temporary and it's only used in the called method. If it's a global const variable then it would probably be in initialized data since there is no need to change it and it's global so it'll never dissapear during the program runtime. It's also possible that global const variables are stored in the heap if you allocate it manually but I don't really know.
PLEASE answer below question write a c program that create data structure that are larger than the amount of physical memory contained in their machine
This is a good effort, but I find this link a lot clearer
"(255) C Programming Tutorial 1 : Memory Layout of a C / C++ Program : Think Aloud Academy - UA-cam"
Thank you for the short and crips description.
Thank you for visually explaining this.
Amazing tutorial and easiest way to learn Memory layout of C programs ....
I always heard that the stack has a fixed size, it doesn't grows. Is this true?
the stack grows, it doesn't have a fixed size
Simple, yet helpful. Thank you
Globals are initialized to 0. Shouldn't they be in .ds ?
How to see stack and heap usage by a program ?
This is very good For understanding
very nice explanation
Could you please stop with the annoying login popups at your website. There is no close button.
thanks narendra
how to print this? which commad is used for it?
where do array, structure and union allocate memory
Have you found the answer?
Heap
what is full form of bss? is it base segment?
block started by symbol
Why bss has 8 bytes by default ?
Some meta data of the program and libraries initialised data will be stored in the bss
Will it be different for other programming languages like C or C++ ?
NO
what is low and high address? anyone?
why didn't the text value change?
Same question
Thank you so much
thanks !
日本語でメモリレイアウトって調べても、めぼしいものが出てこなかったので、英語で調べてこの動画に行きついてよかった( ^ω^ )
what would be stored in the text segment??
Our code or we can say binary code
@@vishalgulia3320 sir as u said initialized variables were stored in one region, uninitialized variables were stored in one region, recursions were stored in heap. my question is, would text segment store all the code or would it store the code except initialized, uninitialized varibale, recursion.
See the source code what we write in c gets compiled and it gets converted into.exe file and then when we run it gets address in the text segment area.
It's the assembly language form of our code. If you write code in C or any other high level programming language, the code gets converted to assembly language by the compiler. Assembly laguage consists of instructions and is just a binary form of the original code you wrote.
where does const data stored?
It depends. If it's a local const vaiable used by a method for example, it would be in the program stack since it's temporary and it's only used in the called method. If it's a global const variable then it would probably be in initialized data since there is no need to change it and it's global so it'll never dissapear during the program runtime. It's also possible that global const variables are stored in the heap if you allocate it manually but I don't really know.
PLEASE answer below question
write a c program that create data structure that are larger than the amount of physical memory contained in their machine
Thank you !
😂😂
average not much clear
who else is from cu?
♿
Video is not clear. Plz post clear video