Skip to content
Snippets Groups Projects
Commit 20499442 authored by August Svensson's avatar August Svensson
Browse files

bare0_1

parent 3147fb95
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ static mut Y: u32 = 0;
#[entry]
fn main() -> ! {
// local mutabale variable (changed in safe code)
// local mutable variable (changed in safe code)
let mut x = unsafe { X };
loop {
......@@ -48,18 +48,19 @@ fn main() -> ! {
// 1. Run the program in the debugger, let the program run for a while and
// then press pause. Look in the (Local -vscode) Variables view what do you find.
//
// ** your answer here **
// * x: 540217
//
// In the Expressions (WATCH -vscode) view add X and Y
// what do you find
//
// ** your answer here **
// * X: 540217
// * Y: 540217
//
// Step through one complete iteration of the loop
// and see how the (Local) Variables are updated
// can you foresee what will eventually happen?
//
// ** place your answer here **
// * It will increase x, X and Y. After a while, x will overflow and go to 0.
//
// Commit your answers (bare0_1)
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment