This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| inputs = { | |
| nixpkgs.url = "github:NixOS/nixpkgs/master"; | |
| }; | |
| outputs = | |
| { self, nixpkgs }: | |
| let | |
| system = "x86_64-linux"; | |
| pkgs = import nixpkgs { inherit system; }; | |
| hp = pkgs.haskell.packages.ghc98.override { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| // EX_0: | |
| // - array declaration | |
| // - array initialization on stack | |
| // - array reads and writes | |
| void ex_0() { | |
| int balance[2][3] = { | |
| {1000, 1000, 1000}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| // EX_0: | |
| // - array declaration | |
| // - array initialization on stack | |
| // - array reads and writes | |
| void ex_0() { | |
| int balance[2][3] = { | |
| {1000, 1000, 1000}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| // EX_0: | |
| // - array declaration | |
| // - array initialization on stack | |
| // - array reads and writes | |
| void ex_0() { | |
| int balance[2][3] = { | |
| {1000, 1000, 1000}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // I only have three examples. Ran out of ideas for more. | |
| // I can make VLA example if helpful? But, since this is discouraged in class, opted not to. | |
| #include <stdio.h> | |
| // EX0: No typedef | |
| struct Sensor { | |
| int id; | |
| double reading; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| // EX_0: | |
| // - array declaration | |
| // - array initialization on stack | |
| // - array reads and writes | |
| void ex_0() { | |
| int balance[2][3] = { | |
| {1000, 1000, 1000}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // I only have three examples. Ran out of ideas for more. | |
| // I can make VLA example if helpful? But, since this is discouraged in class, opted not to. | |
| #include <stdio.h> | |
| // EX0: No typedef | |
| struct Sensor { | |
| int id; | |
| double reading; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Phi: | |
| r: | |
| 1->1 | |
| 2->2 | |
| 3->3 | |
| 4->4 | |
| 5->5 | |
| s: | |
| 1->1 | |
| 2->2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| r: | |
| 1->1 | |
| 2->2 | |
| 3->3 | |
| 4->4 | |
| 5->5 | |
| s: | |
| 1->1 | |
| 2->2 | |
| 3->5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::collections::HashSet; | |
| #[derive(Clone, Copy, PartialEq, Eq, Hash)] | |
| struct Mat { | |
| a: u8, | |
| c: u8, | |
| b: u8, | |
| } | |
| fn mat_mult(a: Mat, b: Mat) -> Mat { |
NewerOlder