You have probably learned how to evaluate simple expressions like \(\sin(\pi/2)\) and \(\log(1/x)\text{.}\) First, you evaluate the expression in parentheses, which is the argument of the function. Then you can evaluate the function itself, either by hand or by punching it into a calculator.
This process can be applied repeatedly to evaluate more-complex expressions like \(\log(1/\sin(\pi/2))\text{.}\) First we evaluate the argument of the innermost function (\(\pi/2 =
1.57\)), then evaluate the function itself (\(\sin(1.57) = 1.0\)), and so on.
Just as with mathematical functions, C++ functions can be composed to solve complex problems. That means you can use one function as part of another. In fact, you can use any expression as an argument to a function, as long as the resulting value has the correct type:
Here is another example you may remember from geometry. Given the lengths of legs a and b in a right triangle, you can find the length of the hypotenuse c with \(\sqrt{a^2 + b^2}\text{.}\) Here is that translated to C++
Before sqrt can do its job, we need to compute its argument by doing the +. But before that can happen, the two pow calls must run. So, they happen first. Then their results are added together. Finally, the square root is taken.
But it is hard to read and will be even harder to debug if you make a mistake somewhere on the line. It also redoes the same work in multiple spots. A better approach would be to write the code as a series of steps that calculate the desired value.