001-005-003

Assigning Variables: Data Copy

Easy

Problem Description

In this problem, you will create a program that copies an integer variable's value to another variable and verifies that the copy remains unchanged when the original is modified, displaying the results to standard output.

Assigning Variables as Values

When assigning a variable's value to another variable, the value is copied. Original and copy are independent.

Key Points

  • int copy = original; copies the value
  • After copying, changing original doesn't affect copy

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up