
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Global Memory Management in C++: Stack or Heap
Stack and heap are used to store variables during the execution of the program and it also get destroyed.
Global data structures or global variables are not consumed by stack or heap. They basically allocated in a fixed memory block, which remains unchanged.
int a[10]; // located in a fixed memory block int main() { int main() { float *ptr = (int *)malloc(sizeof(float)10.0)); //use heap. } }
Advertisements