Question: Consider the code below written using an hypothetical programming language that supports nested functions. float volume (float r, float h) { const int PI
Consider the code below written using an hypothetical programming language that supports nested functions. float volume (float r, float h) { const int PI = 3.14; } float area () { return PI * r } * r; return area () * h; Without further knowledge about this language, other than knowing that the code is syntactically correct, do you think function volume will work as expected? Does it matter if the language uses static or dynamic scoping? Justify your answer.
Step by Step Solution
3.40 Rating (147 Votes )
There are 3 Steps involved in it
Based solely on the provided code snippet and without knowledge of whether the hypothetical programm... View full answer
Get step-by-step solutions from verified subject matter experts
