summaryrefslogtreecommitdiff
path: root/exercises/005_arrays2.zig
diff options
context:
space:
mode:
authorIbrahim Muftee <ibrahim@muftee.net>2026-06-29 15:11:40 -0500
committerIbrahim Muftee <ibrahim@muftee.net>2026-06-29 15:15:14 -0500
commitbdfe3df2947f8787c8a4ef8c534f6a8932e13871 (patch)
treef2df9a5f56b6c7f95c0978a861cb0ecf60560391 /exercises/005_arrays2.zig
parentd093f37e1e4c5aed4a4c8d4999001134aec251ca (diff)
feat: begin solving exercises
Diffstat (limited to 'exercises/005_arrays2.zig')
-rw-r--r--exercises/005_arrays2.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/005_arrays2.zig b/exercises/005_arrays2.zig
index 07b9abe..e170266 100644
--- a/exercises/005_arrays2.zig
+++ b/exercises/005_arrays2.zig
@@ -21,12 +21,12 @@ pub fn main() void {
// (Problem 1)
// Please set this array concatenating the two arrays above.
// It should result in: 1 3 3 7
- const leet = ???;
+ const leet = le ++ et;
// (Problem 2)
// Please set this array using repetition.
// It should result in: 1 0 0 1 1 0 0 1 1 0 0 1
- const bit_pattern_unit = [_]u8{ ??? };
+ const bit_pattern_unit = [_]u8{ 1, 0, 0, 1 };
const bit_pattern: [3 * bit_pattern_unit.len]u8 = @bitCast(@as([3][bit_pattern_unit.len]u8, @splat(bit_pattern_unit)));
// Okay, that's all of the problems. Let's see the results.