The Gateway to Computer Science Excellence
0 votes
Will recursion work correctly in a language with static allocation of all variables? Explain.
in Compiler Design by Boss (30.2k points) | 242 views

1 Answer

+2 votes

Recursion can not be used for static variables since the memory for static variables are allocated only once . so if we use recursion, then it  may give incorrect result . Generally, we do not want such things when implementing recursion.

For detailed explanation, refer

by Junior (539 points)
edited by

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,644 questions
56,500 answers
100,995 users