In this video, we're going to examine and step through a swap function that was written with pointers. Previously, we looked at a swap function that was written without pointers that didn't actually work. This one does and it's been written slightly differently. First, let's examine the differences. The first thing you'll notice is that swap takes two arguments, x and y which are pointers to integers. You'll see here, that we have written and int star then a space then an x, and an int star then a space and then a y. You could also write it in the following way with the x right next to the star. Both of these are correct and you'll see both when you look at C code. Now, x and y are pointers to integers. So, as we access the values of the integers that x and y point to in the code inside swap, we're going to have to de-reference x and y. And so, that's why we'll see these stars in front of x and y throughout the code. The final difference is how you call this function. In the main, instead of passing in a and b, we now have to pass in the address of a and the address of b. So, let's step through this function. We begin in the main. We have a variable a and a variable b, that have initial values three and four. Now, when we call the swap function instead of passing in three and four as we did in the previous version of this function, we now need to pass in the address of a and the address of b. So, we're going to create variables x and y, and x will point back to a and y will point back to b. Let's step into the function. We're going to mark the call site location 1 and hop into the swap function. Inside of swap, we're going to make a new variable called temp and that's where we're going to temporarily store the value that x points to, which is the value of a, which is three. Now, we can take the value that y points to which is the value of b or four and store that in the value that x points to, namely the variable a. Finally, we're going to take the temporary variable three and store that into the integer that y points to, which is the variable b. When we step out of the function, we see that our original variables a and b have indeed been swapped. So, when we execute the print statement, we now have a equals four and b equals three which is what we were expecting to have from a correctly working swap function.