Yes both pass by value and call by value are similar.
In this first program we are passing the x and y values through swap() calling function. So it is called as Call by value or pass by value.
In the second program we are passing the addresses of x and y memory locations to the pointers a and b. If you observe here x and y addresses are also values. so it is also called as call by value. But so many of them assume this second program as an example for call by reference.