The Gateway to Computer Science Excellence
+2 votes
151 views

Consider the following statements:
S1 : Static allocation can not support recursive function.
S2 : Stack allocation can support pointers but can not deallocate storage at run-time.
S3 : Heap allocation can support pointers and it can allocate or deallocate storage at run-time.
Which of the above statements are true?

S1 and S2

S2 and S3

S3 and S1

d  S1, S2 and S3

in Compiler Design by Boss (25.6k points)
edited by | 151 views

3 Answers

0 votes
Answer should be D
by (431 points)
0 votes

Answer D s1s2 s3 all are true

by Loyal (5.4k points)
0 votes

TRUE   S1 : Static allocation can not support recursive function.

FALSE  S2 : Stack allocation can support pointers but can not deallocate storage at run-time.

Stack memory is allocated during compilation time execution. This is known as static memory allocation.

https://iq.opengenus.org/static-memory-allocation-c/

TRUE   S3 :  Heap allocation can support pointers and it can allocate or deallocate storage at run-time.

 

by Junior (515 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,385 answers
198,549 comments
105,365 users