From 0963b3d03b64fbc983c2275ce6727992e4e932e4 Mon Sep 17 00:00:00 2001 From: 97gushan <97gustavh@gmail.com> Date: Mon, 24 Feb 2020 08:59:59 +0100 Subject: [PATCH] bare3 3 --- examples/bare3.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/bare3.rs b/examples/bare3.rs index 9f41ec0..c54c867 100644 --- a/examples/bare3.rs +++ b/examples/bare3.rs @@ -37,7 +37,7 @@ fn main() -> ! { hprintln!("").unwrap(); let a: [u8; 4] = [65u8; 4]; - // let mut a = [0u8; 4]; + let mut a = [0u8; 4]; hprintln!("").unwrap(); hprintln!("a = {}", core::str::from_utf8(&a).unwrap()).unwrap(); @@ -96,7 +96,8 @@ fn main() -> ! { //` // Run the program, what happens and why? // -// ** your answer here ** +// a becomes a list of length 4 with each value being 0. This is translated as the null char in the ascii table +// This gives an output of: "a =" // // Commit your answers (bare3_3) // -- GitLab