Question

In: Computer Science

Q1: Recursion is implemented by the system: Group of answer choices: using compile time storage allocation....

Q1:

Recursion is implemented by the system:

Group of answer choices:

using compile time storage allocation.

using run time storage allocation.

using static storage allocation.

using a single static "stack frame".

Solutions

Expert Solution

Solutions:-

Recursion is implemented by the system:-Ans:-b)using run time storage allocation.

There will be four options but option b) is the correct because of few reasons.I will expain below.

Let's come to the point-

Correct Answer:-

b)using run time storage allocation.

Wrong Answer:-

a)using compile time storage allocation.

c)using static storage allocation.

d)using a single static "stack frame".

Reasons:-

a)using compile time storage allocation:-

We know that compile time storage allocation is also known as a static memory allocation.Compile time memory allocation or storage allocation means reserving memory for constants,variables during the copilation process. Recursion can only be implemented dynamic memory allocaton that's why this option is wrong.

b)using run time storage allocation:-

Run time stroge allocation is known as dynamic memory allocation.Memory allocated runtime either calloc() ,malloc() or realloc() is called run time memory allocation or dynamic memory allocation.Recursion can only be implemented dynamic memory allocation. so, This option is correct option.

c)using static storage allocation:-

Previously i wrote anout static storage allocation .check option a) . Recursion can only be implemented dynamic memory allocaton that's why this option is wrong.

d)using a single static "stack frame":-

stack frame is nothing but it is known as activation record is the collection of all data on the stack associated with one subprogram call. It is Single static stack frame. It is not applicable for dynamic memory and Recursion can only be implemented dynamic memory allocation. so, This option is wrong option.


Related Solutions

Question 11 pts In a Pareto efficient allocation, Group of answer choices there are gains from...
Question 11 pts In a Pareto efficient allocation, Group of answer choices there are gains from trade still not captured in the economy. there is no way to make any person better off without making someone else worse off Some people can be made better off without making others worse off, but there is no way to make most people better off without making some others worse off. Total utility in society is maximized. Flag this Question Question 21 pts...
Q1) A monopolist will choose to increase output when Group of answer choices at the present...
Q1) A monopolist will choose to increase output when Group of answer choices at the present level of output, marginal revenue exceeds marginal cost. market price increases. the demand curve shifts to the left. at all levels of output, marginal cost increases. Q2) The deadweight loss that arises from a monopoly is a consequence of the fact that the monopoly Group of answer choices earns positive profits. price is the same as average revenue. price equals marginal revenue. quantity is...
Which of the following statements is incorrect regarding Bucket based asset allocation? Group of answer choices...
Which of the following statements is incorrect regarding Bucket based asset allocation? Group of answer choices A. Investors are able to change allocation of assets within, and across, each bucket based on changes in investment objectives. B. A "Three Bucket" based asset allocation allows for better allocation of risk than a Risk Parity portfolio, since portfolio managers can choose the level of risk allocation or types of investments to each bucket. C.Allocation of assets within each bucket can be done...
Which of the following statements is incorrect regarding Bucket based asset allocation? Group of answer choices...
Which of the following statements is incorrect regarding Bucket based asset allocation? Group of answer choices Investors are able to change allocation of assets within, and across, each bucket based on changes in investment objectives. Asset allocation based on "Three Buckets" is inferior to Mean-Variance allocation that uses historical risk, return and correlation for each asset since the MV framework is backed by a sound theoretical framework. A "Three Bucket" based asset allocation allows for better allocation of risk than...
Which of the following statements is incorrect regarding Bucket based asset allocation? Group of answer choices...
Which of the following statements is incorrect regarding Bucket based asset allocation? Group of answer choices Allocation of assets within each bucket can be done either through a quantitative methodology or a qualitative methodology which considers the inherent nature of each asset that is considered to be included in the portfolio A "Three Bucket" based asset allocation allows for better allocation of risk than a Risk Parity portfolio, since portfolio managers can choose the level of risk allocation or types...
Q1. The Human Development Index ( HDI) ... Group of answer choices -All options are correct...
Q1. The Human Development Index ( HDI) ... Group of answer choices -All options are correct -is a summary measure of life expectancy, education, and per capita income indicators. -was created to emphasize that GDP per capita is a good proxy for wellbeing. -is a summary measure of income and inequality. Q2. Using the relative poverty line we can compare the evolution of poverty across countries over time. Group of answer choices True False Q3. Country X has a population...
When using Time Series forecasting, what is true about Double Exponential Smoothing? Group of answer choices...
When using Time Series forecasting, what is true about Double Exponential Smoothing? Group of answer choices The double exponential smoothing technique should not be used for predicting seasonal data. Double Exponential Smoothing is able to predict both a level effect and a trend effect in the data. It is good for predicting cyclical data. When Alpha (level) coefficient and Gamma (trend) coefficient are closer to .1 (rather than closer to .9), this tends to smooth the prediction. All of the...
Xylem and phloem are parts of Group of answer choices the vascular system in plants names...
Xylem and phloem are parts of Group of answer choices the vascular system in plants names for the hairs of a dandelion flower the photosynthetic system in plants involved directly in protein synthesis
Q1 Access to stored data enables knowledge workers to: Group of answer choices copy, save, name...
Q1 Access to stored data enables knowledge workers to: Group of answer choices copy, save, name and create files move, delete, retrieve, update and display files print, import and protect files all of the above Flag this question Question 21 pts Which of the following is an advantage of using a relational database rather than one large table? Group of answer choices Data redundancy is maximised Only one user can access the information at a specific time Data is often...
1- The changes in characteristics of a species over time. Group of answer choices fitness evolution...
1- The changes in characteristics of a species over time. Group of answer choices fitness evolution reproduction natural selection 2- A group of animals that are all the same species is referred to as what? Group of answer choices population kingdom community biosphere 3- Inherited characteristics that enhance an organisms ability to survive and reproduce are called what? Group of answer choices evolution fitness natural selection adaptations 4- How can an adaptation lose its value? Group of answer choices If...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT