answersLogoWhite

0


Best Answer

Nothing special, try it:

void foo (int frec, int val)

{

. int x= val;

. if (frec) {

. . printf ("before recursion x=%d\n", x);

. . foo (frec-1, val+1);

. . printf ("after recursion x=%d\n", x);

. } else {

. . printf ("in recursion x=%d\n", x);

. }

}

User Avatar

Wiki User

2010-12-01 16:18:02
This answer is:
User Avatar
Study guides
📓
See all Study Guides
✍️
Create a Study Guide
4.25
12 Reviews

Add your answer:

Earn +20 pts
Q: When a function is recursively called what happened to automatic variables?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What happens when variables are not properly initialized?

In C, uninitialized variables may contain any value, usually whatever happened to be in the same memory location before the memory was allocated to that function. This is a likely source of bugs, since it means that whatever the programmer meant for the variable to contain was not in it.


What are social variables?

Social variables are those aspects of a person which may well impact on the way in which they answer a question, speak a language's dialect, what accent they have, where they shop, their politics, etc... Generally speaking Social Scientists insist on "controlling for" (taking account of) the social variables of respondents in order to ensure that their test results and responses from any study's participants are 'valid' Generally, social variables include (but are not limited to): -Gender -Age -Social class -Region of origin -Region of residence -Occupation -Salary/income range -etc... The reason we Social Scientists control for these variables is that if you were to ask 100 random people whether pre-marital sexual activity was acceptable and of those asked 90 were lower-middle class university students who happened to be male, and the other 10 were female church members for the mid-west of the US, then you're going to get VERY skewed results which would, essentially, invalidate your study.


What happened to the append function in python?

It's still there... Type the following into a python prompt... x = [7,4,3] x.append(5) print(x) and you get the result... [7,4,3,5] It's definitely working in python 3


What will happened when you enter wrong data?

You get the wrong results.


When did DC Heroes happen?

DC Heroes happened in 1985.

Related questions

What happens when variables are not properly initialized?

In C, uninitialized variables may contain any value, usually whatever happened to be in the same memory location before the memory was allocated to that function. This is a likely source of bugs, since it means that whatever the programmer meant for the variable to contain was not in it.


What is the default value of int in c?

I'm not sure. I have written C programs in which the default value was what ever happened to be in the variable's memory location when the space was allocated. So it could be 0. Or it could be anything. That is why it is always important to initialize variables when using C. I don't know if this is true with modern C compilers. No default value for automatic variables, 0 for others.


What happened if plasma membrane does not function well?

it will cause disease and it will not function well


The probability of getting into a car accident as a function at the speed of which you drive?

No function can get us a right or even close answer, this is all dependent on infinite number of variables. however, lower speeds reduces the probability in known factor. But more important it will decrease the damage to human in case accident happened. be safe and drive slowly.


Did the law in Indiana recently change to automatic emancipation for children who are 19?

Yes it happened this Summer.


What will happened to the roots if the tissues are damage?

the roots will not function well.


What would happened the proteins that support a DNA molecule failed to function?

folds up


What might happened if the skeletal system didn't function properly?

Depending on the degree of malfunction, absolutely nothing to death.


When posting variables if you do not value the variable then you want to display the variable value. What is going on Explain?

I believe you are referring to uninitialised variables, although it's hard to tell from the wording of the question. If you attempt to print the value of an uninitialised variable, the behaviour is undefined. Typically, when a variable is uninitialised, the memory to which the variable is allocated will be left unchanged; it will hold whatever value happened to exist there at the point the variable was instantiated. However, only local variables (allocated on the stack) and dynamic variables (allocated on the heap) are uninitialised by default. Static variables are zero-initialised by default and object variables are always initialised according to whichever class constructor was invoked at the point of instantiation. Most compilers will detect attempts to use uninitialised local variables and will emit warnings to that effect during compilation.


What happened if a 1992 Hyundai Excel with an automatic transmission was just driving along and it was like it went into neutral no forward gears and no reverse gear?

time to get new trannie


If you have an automatic ice maker to Ice Cube from the bottom up Trey to the ones on top what happened?

Depending on your preference. You could put the top on bottom or vice versa.


What is the difference between Observational and experimental study?

In an Observational study, the researcher merely observes what is happening or what has happened in the past and tries to draw conclusions based on these observations. In Observation study, there is no human intervention In an Experimental study, the researcher manipulates on of the variables and tries to determine how the manipulation influences other variables. In an Experimental study, there is human intervention.

People also asked