Passing Pointers as Arguments

In this lesson, we'll try passing pointers as input arguments to functions!

We'll cover the following

Pointer Scope

As we’ve learned in the Function section, function arguments are usually local in scope. Once we return from the function, all its variables are deleted forever.

One solution was to pass external variables by reference using the & operator. This would alter the values of the variables outside the function scope.

Get hands-on with 1400+ tech skills courses.