heap memory and stack memory
i m not able to get functionality of these two. please explain me with an example
@Apoorva, stack being "fixed" is not really true. In contrast to heap you cannot allocate memory on the heap freely, i.e. as you like. Nevertheless, stack is dynamic, too. Example: recursive functions. For every call to a function, the local memory required for this function is allocated. If the depth of recursion depends on user input, the amount of memory required is not known when the program is started. Therefore, the difference between stack and heap is not "dynamic" or "fixed", it's how freely / self-determined you can allocate memory on it.
Mar jao na
@Apoorva: Hehe, I can't speak Hindu :-)
You can allocate heap memory according to requirement by using codes when you don't know what the file size is gonna be. Stack is fixed
I have tried every way I could find but still I can't display my local images ..what am I doing wrong?
Pls rectify the errors.
I cant understand what the problem here is. Can anyone help me out? the system in sololearn called it an error in test case 1
Izzy the iguana code coach