wiz-icon
MyQuestionIcon
MyQuestionIcon
3
You visited us 3 times! Enjoying our articles? Unlock Full Access!
Question

Consider the following statements :
S1 : While program in execution, access to heap memory is slower as compared to accessing variables allocated on stack.
S2 : While program in execution, in a multithread situation, each thread has its own stack and share a common heap memory.
S3 : During a program execution, heap is stored in main memory and stack is present in secondary memory.
Which of the above is incorrect ?

A
Only S2 and S3
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Only S1 and S2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
All of these
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
Only S3
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution

The correct option is D Only S3
Statement S1 and S2 are correct.
Statement S3 is incorrect. Heap and stack both are present in main memory.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Properties of Matrix Multiplication
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon