From 4e8af7e8352a78e383f211dc78a40143e36b3988 Mon Sep 17 00:00:00 2001 From: imnyang Date: Tue, 17 Mar 2026 10:09:14 +0900 Subject: [PATCH] cool --- .zed/tasks.json | 4 ++-- 02_11p.c => 02/02_11p.c | 0 02_13p.c => 02/02_13p.c | 0 02/02_14p_1.c | 13 +++++++++++++ 02/02_14p_2.c | 8 ++++++++ 02/02_14p_3.c | 6 ++++++ 02/02_14p_4.c | 7 +++++++ 02/02_24.c | 8 ++++++++ 02/02_25.c | 11 +++++++++++ 02/02_33p.c | 11 +++++++++++ 02/02_38p.c | 8 ++++++++ init.ps1 | 5 +++++ 12 files changed, 79 insertions(+), 2 deletions(-) rename 02_11p.c => 02/02_11p.c (100%) rename 02_13p.c => 02/02_13p.c (100%) create mode 100644 02/02_14p_1.c create mode 100644 02/02_14p_2.c create mode 100644 02/02_14p_3.c create mode 100644 02/02_14p_4.c create mode 100644 02/02_24.c create mode 100644 02/02_25.c create mode 100644 02/02_33p.c create mode 100644 02/02_38p.c create mode 100644 init.ps1 diff --git a/.zed/tasks.json b/.zed/tasks.json index 9f717ab..8889305 100644 --- a/.zed/tasks.json +++ b/.zed/tasks.json @@ -4,7 +4,7 @@ [ { "label": "Build Current File", - "command": "gcc -Wall -Wextra -g -std=c11 -O2 $ZED_FILENAME -o ./output/$ZED_STEM.exe", + "command": "$rand = -join ((97..122) | Get-Random -Count 6 | % {[char]$_}); $outputFile = \"./output/${ZED_STEM}_$rand.exe\"; gcc -Wall -Wextra -g -std=c11 -O2 $ZED_FILE -o $outputFile", //"args": [], // Env overrides for the command, will be appended to the terminal's environment from the settings. "env": {}, @@ -53,7 +53,7 @@ }, { "label": "Build & Run Current File", - "command": "gcc $ZED_FILENAME -o ./output/$ZED_STEM.exe ; if ($?) { ./output/$ZED_STEM.exe }", + "command": "$rand = -join ((97..122) | Get-Random -Count 6 | % {[char]$_}); $outputFile = \"./output/${ZED_STEM}_$rand.exe\"; gcc -Wall -Wextra -g -std=c11 -O2 $ZED_FILE -o $outputFile; if ($?) { &$outputFile }", //"args": [], // Env overrides for the command, will be appended to the terminal's environment from the settings. "env": {}, diff --git a/02_11p.c b/02/02_11p.c similarity index 100% rename from 02_11p.c rename to 02/02_11p.c diff --git a/02_13p.c b/02/02_13p.c similarity index 100% rename from 02_13p.c rename to 02/02_13p.c diff --git a/02/02_14p_1.c b/02/02_14p_1.c new file mode 100644 index 0000000..d271e0d --- /dev/null +++ b/02/02_14p_1.c @@ -0,0 +1,13 @@ +#include + +int main() { + int a; + a = 10; + int b; + b = 20; + + printf("a : %d\n", a); + printf("b : %d\n", b); + + return 0; +} diff --git a/02/02_14p_2.c b/02/02_14p_2.c new file mode 100644 index 0000000..fb629bc --- /dev/null +++ b/02/02_14p_2.c @@ -0,0 +1,8 @@ +#include + +int main() { + int A; + printf("%d", a); + + return 0; +} diff --git a/02/02_14p_3.c b/02/02_14p_3.c new file mode 100644 index 0000000..ccf25c9 --- /dev/null +++ b/02/02_14p_3.c @@ -0,0 +1,6 @@ +#include + +int main() { + int a, int b, int c; + return 0; +} diff --git a/02/02_14p_4.c b/02/02_14p_4.c new file mode 100644 index 0000000..a854ce0 --- /dev/null +++ b/02/02_14p_4.c @@ -0,0 +1,7 @@ +#include + +int main() { + int if; + + return 0; +} diff --git a/02/02_24.c b/02/02_24.c new file mode 100644 index 0000000..583221f --- /dev/null +++ b/02/02_24.c @@ -0,0 +1,8 @@ +#include +#define TMP 20 + +int main() { + printf("TMP: %d\n", TMP); + // TMP = 10; + return 0; +} diff --git a/02/02_25.c b/02/02_25.c new file mode 100644 index 0000000..efe2e1d --- /dev/null +++ b/02/02_25.c @@ -0,0 +1,11 @@ +#include + +int main() { + int const a = 100; + const int b = 200; + + printf("a: %d\n", a); + printf("b: %d\n", b); + + return 0; +} diff --git a/02/02_33p.c b/02/02_33p.c new file mode 100644 index 0000000..d6f25c4 --- /dev/null +++ b/02/02_33p.c @@ -0,0 +1,11 @@ +#include + +int main() { +printf("char: %zu byte\n", sizeof(char)); +printf("int: %zu bytes\n", sizeof(int)); +printf("long: %zu bytes\n", sizeof(long)); +printf("long long: %zu bytes\n", sizeof(long long)); +printf("pointer: %zu bytes\n", sizeof(void*)); + +return 0; +} diff --git a/02/02_38p.c b/02/02_38p.c new file mode 100644 index 0000000..1fe968a --- /dev/null +++ b/02/02_38p.c @@ -0,0 +1,8 @@ +#include +#include + +int main() { + printf("%f", sqrt(2)); + + return 0; +} diff --git a/init.ps1 b/init.ps1 new file mode 100644 index 0000000..86b9ef7 --- /dev/null +++ b/init.ps1 @@ -0,0 +1,5 @@ +$env:Path += ';C:\mingw64\bin' + +winget source update +winget install waterfox.waterfox --source winget +winget install ZedIndustries.Zed --source winget