Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are stack and heap areas?
Home
C Plus Plus
What are stack and heap areas?
0
votes
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
What are stack and heap areas?
c-interview-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 11
by
GeorgeBell
Heap Area:
It is used for the objects allocated dynamically (Using malloc() and calloc()).
Stack Area:
It is used to store local variables and arguments of a method. This stays in memory only till the termination of that particular method.
Related questions
0
votes
Q: Can you explain the role of the stack and the heap in relation to Segmentation Faults?
asked
Nov 29, 2023
in
C Plus Plus
by
JackTerrance
segmentation-fault-interview-questions
0
votes
Q: What are loops and how can we create an infinite loop in C?
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What are the differences Deep Copy and Shallow Copy with examples?
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between getc(), getchar(), getch() and getche().
asked
Jan 12
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is near, far, and huge pointers in C?
asked
Jan 12
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is static memory allocation and dynamic memory allocation?
asked
Jan 12
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between macro and functions?
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between type casting and type conversion?
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between the local and global variables in C?
asked
Jan 11
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
0
votes
Q: What is the difference between near, far and huge pointers?
asked
Jan 9
in
C Plus Plus
by
GeorgeBell
c-interview-questions-answers
...