005_arrays2.patch 617 B

1234567891011121314151617
  1. --- exercises/005_arrays2.zig 2023-10-03 22:15:22.122241138 +0200
  2. +++ answers/005_arrays2.zig 2023-10-05 20:04:06.862763262 +0200
  3. @@ -25,12 +25,12 @@
  4. // (Problem 1)
  5. // Please set this array concatenating the two arrays above.
  6. // It should result in: 1 3 3 7
  7. - const leet = ???;
  8. + const leet = le ++ et;
  9. // (Problem 2)
  10. // Please set this array using repetition.
  11. // It should result in: 1 0 0 1 1 0 0 1 1 0 0 1
  12. - const bit_pattern = [_]u8{ ??? } ** 3;
  13. + const bit_pattern = [_]u8{ 1, 0, 0, 1 } ** 3;
  14. // Okay, that's all of the problems. Let's see the results.
  15. //