What happens in memory when calling a function with literal values?
- by Drise
Suppose I have an arbitrary function:
void someFunc(int, double, char);
and I call someFunc(8, 2.4, 'a');, what actually happens? How does 8, 2.4, and 'a' get memory, moved into that memory, and passed into the function? What type of optimizations does the compiler have for situations like these? What if I mix and match parameters, such like someFunc(myIntVar, 2.4, someChar);?
What happens if the function is declared as inline?