I'm confused in C language. I clearly don't understand What happens inside the function when we call the function from main.
In a program, there is function ADDITION that taks two value After that adds both and gives the result.
I'm trying to understand what happens when function ADDITION is called from main.
Where are the values 10 and 20 stored, is it a temporary store ?
x and y are local variables only accessible in the function where they are declared. It cannot be accessed outside of their scope.
It is said that when we call the function then at start variables are created and when the function ends then the variables are destroyed. What does it mean in context of hardware microcontroller?
C:
int ADDITION ( int x; int y)
{
int Results;
Results = ( x + y) ;
return Results;
}
void main ( )
{
ADDITION ( 10; 20);
}
I'm trying to understand what happens when function ADDITION is called from main.
Where are the values 10 and 20 stored, is it a temporary store ?
x and y are local variables only accessible in the function where they are declared. It cannot be accessed outside of their scope.
It is said that when we call the function then at start variables are created and when the function ends then the variables are destroyed. What does it mean in context of hardware microcontroller?