Yes, calling a function executes the code contained within it. Functions are used to seperate code into more efficient blocks. If you had, say, a block of code which is executed many times during a program, instead of writing the same code in many times, you just place it in a function, and then call that function whenever you need to execute its code. Here is a trivial example:
Code:
int MultiplyTwoNumbers(int FirstNumber,int SecondNumber)
{
return (FirstNumber * SecondNumber);
}
int main()
{
int Answer=MultiplyTwoNumbers(5,7);
return Answer;
}
Here, a function, 'MultiplyTwoNumbers', is defined, and it takes two ints as parameters and returns an int. This means that the int 'Answer' will be assigned the value 5*7 =35.
Make sure to only use functions to avoid heavy repetitions of code, or to encapsulate a certain activity.