C When Is Memory For A Variable Allocated
C When Is Memory For A Variable Allocated. Neither static- nor automatic-duration When the memory is no longer needed, the pointer is passed to free which deallocates the memory. Static memory persists throughout the entire life of the program, and is usually used to store things like global variables, or variables created with the Stack overflow happens when all the memory in the stack has been allocated, and further allocations begin overflowing into other sections of memory.
Neither static- nor automatic-duration When the memory is no longer needed, the pointer is passed to free which deallocates the memory.
Then I again allocated memory for an int variable and set p to point at it.
On most systems, this memory section can be expanded when needed. Hi I want to know when and where memory for static variables are allocated in a C program. It is in latter steps made to point to some variable and hence it is initialized.
0 Response to "C When Is Memory For A Variable Allocated"
Posting Komentar