Copy Type and Moved Type

This lesson discusses what happens in tems of memory when variables are assigned to another variable.

Copy Type

The ownership state of the original variable (whose value is assigned to another variable) is set to copied state. This means that the value of the assignee variable is copied to the assigned variable. A copy of the value is created so that the assignee variable gets the ownership of the value but both the variables have their own copies.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy