KEMBAR78
Rust Advanced Lab | PDF
0% found this document useful (0 votes)
20 views1 page

Rust Advanced Lab

The document is a lab manual for advanced programming in Rust, featuring an example of ownership. It includes a code snippet demonstrating how ownership works with a string variable. The output of the code is 'hello'.

Uploaded by

hitsaiml2c
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Rust Advanced Lab

The document is a lab manual for advanced programming in Rust, featuring an example of ownership. It includes a code snippet demonstrating how ownership works with a string variable. The output of the code is 'hello'.

Uploaded by

hitsaiml2c
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Rust Advanced Programming Lab

Lab Manual: Advanced Level Programs

Contents:

1. 1. Ownership Example

1. Ownership Example
Code:

fn main() {
let s1 = String::from("hello");
let s2 = s1;
println!("{}", s2);
}

Output:

hello

You might also like