Passing Parameters
Learn how we can pass values to the functions in C++.
Passing Methods
Values can be passed to a function through two methods.
Pass by value: Creates a copy of the variable being passed. Any change to the copy is not reflected in the original.
Pass by reference: Creates an alias of the variable being passed. Alias is not a new variable but instead a new name referring to the same memory location as that of the variable being passed. Any change is reflected in the original
Create a free account to access the full course.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy