In parameter
An in parameter is a parameter that function receives as input from the caller. It does (could) not modify the original value in the caller scope. For example,
void print(int value)
{
std::cout << value;
}Here value is being served as input value and print can’t change the original value of value in caller scope.
Out parameter
An out parameter is a parameter that is given to the function to modify and serving as output from the function without actually returning it. This parameter is not even used as input. Pass by reference and address are used to provide out parameters.
For example,
void updateValue(int& value)
{
value = 12;
}
int main
{
int value{10};
updateValue(value);
return 0;
}In/out parameter
This is out parameter but it is also used as input where function uses its value and later overrides it.