Hands-on Task - Implement a basic program that uses ownership concepts

Task Details

In this task, students will create a simple Rust program that demonstrates the concepts of ownership, borrowing, and references. The program will take two strings as input, concatenate them, and then print the result without violating any ownership rules

Checklist

  • Write the concatenate_strings function signature.

  • Implement the concatenate_strings function.

  • Initialize two String variables in the main function.

  • Call the concatenate_strings function with string slices of the variables.

  • Print the result to the console.

  • Compile and run the program to test its functionality.