From d660acf77dae535236e267066fac5e859795827a Mon Sep 17 00:00:00 2001 From: Hammarkvast <tomham-3@student.ltu.se> Date: Tue, 7 Apr 2020 20:39:20 +0200 Subject: [PATCH] bare3_1 --- examples/bare3.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/examples/bare3.rs b/examples/bare3.rs index 665b4da..75063ea 100644 --- a/examples/bare3.rs +++ b/examples/bare3.rs @@ -56,26 +56,49 @@ fn main() -> ! { // // ** your answer here ** // +// bare3 +//s = ABCD +//bs = [65, 66, 67, 68] +//iterate over slice +//65,66,67,68,iterate iterate using (raw) indexing +//65, +//66, +//67, +//68, +// +// +//a = AAAA +// // What is the type of `s`? // // ** your answer here ** // +// s is a string of characters (str) +// // What is the type of `bs`? // // ** your answer here ** // +// bs is a list of integers (&[u8]) +// // What is the type of `c`? // // ** your answer here ** // +// i is each element in the list bs (u8) +// // What is the type of `a`? // // ** your answer here ** // +// [u8; 4] +// // What is the type of `i`? // // ** your answer here ** // +// usize +// // Commit your answers (bare3_1) // // 2. Make types of `s`, `bs`, `c`, `a`, `i` explicit. -- GitLab