W
W
Whomai2018-05-12 13:14:33
C++ / C#
Whomai, 2018-05-12 13:14:33

Are different memory allocations in the function definition and in the function itself?

Here is the code. In the function definition (the second line), the memory will be inserted for f and for h, right? And in the function itself ( int changing (int fahr, int upper)) for fahr and for upper, another memory is introduced? That is, when we define a function, we additionally add memory?

#include<stdio.h>
int changing (int f , int h); 
 
int main() 
{ 
 ... 
 
 changing(0,200); 
 return 0; 
} 
 
 int changing(int fahr,int upper)
{ 
 ... 
 
 return 0; 
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-05-12
@alexr64

That is, when we define a function, we additionally add memory?

When we define a function, we tell the compiler about the function. In the final code, when adding debugging information is disabled, the function definition does not get into it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question