From 06dbb6fd573f26beb6638fe984c3165c0fcb4c02 Mon Sep 17 00:00:00 2001 From: Hammarkvast <tomham-3@student.ltu.se> Date: Tue, 7 Apr 2020 21:06:19 +0200 Subject: [PATCH] bare3_3 --- examples/bare3.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/bare3.rs b/examples/bare3.rs index 48c0f5b..15b89b8 100644 --- a/examples/bare3.rs +++ b/examples/bare3.rs @@ -37,8 +37,8 @@ fn main() -> ! { hprintln!("").unwrap(); - let a = [0u8; 4]; - // let mut a = [0u8; 4]; + //let a = [0u8; 4]; + let mut a = [0u8; 4]; hprintln!("").unwrap(); hprintln!("a = {}", core::str::from_utf8(&a).unwrap()).unwrap(); @@ -111,6 +111,10 @@ fn main() -> ! { // Run the program, what happens and why? // // ** your answer here ** +// +// Everything basically acts as normal, except for the final line which +// is a = , this is because whats right of the equal sign is the value of +// a turned from ASCII to a character, which in this case is NULL. // // Commit your answers (bare3_3) // -- GitLab