diff --git a/examples/bare3.rs b/examples/bare3.rs index 665b4da687d3ca0285abdf1ae5268b9ba0a4c340..75063ea18a418175d92c078aee11476eb9420ac8 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.