diff --git a/C(system program)/Практическая 1/1.1.c b/C(system program)/Практическая 1/1.1.c deleted file mode 100644 index d325fe0..0000000 --- a/C(system program)/Практическая 1/1.1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* Type your code here, or load an example. */ -#include -#include -#include -#include -int main(void) { -int a = 26; -int b = 5; -int c = a / b; -return 0; -} - - \ No newline at end of file diff --git a/C(system program)/Практическая 1/1.1.png b/C(system program)/Практическая 1/1.1.png deleted file mode 100644 index 0c38c41..0000000 Binary files a/C(system program)/Практическая 1/1.1.png and /dev/null differ diff --git a/C(system program)/Практическая 1/1.2.c b/C(system program)/Практическая 1/1.2.c deleted file mode 100644 index d5f4c4c..0000000 --- a/C(system program)/Практическая 1/1.2.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Type your code here, or load an example. */ -#include -#include -#include -#include -// int main(void) { -// int a = 26; -// int b = 5; -// int c = a / b; -// return 0; -// } -unsigned short swap_bytes(unsigned short num) { - return ((num & 0x00FF) << 8) | ((num >> 8)); - } - - - \ No newline at end of file diff --git a/C(system program)/Практическая 1/1.2.png b/C(system program)/Практическая 1/1.2.png deleted file mode 100644 index ed34861..0000000 Binary files a/C(system program)/Практическая 1/1.2.png and /dev/null differ diff --git a/C(system program)/Практическая 1/1.3.png b/C(system program)/Практическая 1/1.3.png deleted file mode 100644 index 008722f..0000000 Binary files a/C(system program)/Практическая 1/1.3.png and /dev/null differ diff --git a/C(system program)/Практическая 1/1.4.png b/C(system program)/Практическая 1/1.4.png deleted file mode 100644 index 52c6484..0000000 Binary files a/C(system program)/Практическая 1/1.4.png and /dev/null differ diff --git a/C(system program)/Практическая 1/1.5.c b/C(system program)/Практическая 1/1.5.c deleted file mode 100644 index 9a05701..0000000 --- a/C(system program)/Практическая 1/1.5.c +++ /dev/null @@ -1,13 +0,0 @@ -#include - -int main(void) { - const long long x = 5; - long long factorial = 1; - - for (long long i = 1; i <= x; ++i) { - factorial *= i; - } - - printf("%lld! = %lld\n", x, factorial); - return 0; -} \ No newline at end of file diff --git a/C(system program)/Практическая 1/readme.md b/C(system program)/Практическая 1/readme.md deleted file mode 100644 index 8cbe613..0000000 --- a/C(system program)/Практическая 1/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -### Ex 1 -![solution ex1](1.1.png) - -### Ex 2 -![solution ex2](1.2.png) - -### Ex 3 -![solution ex3](1.3.png) - -### Ex 4 -![solution ex4](1.4.png) - -## Ex 5 -## Описание уровней оптимизации - **-O0** — цикл остаётся циклом: генерируются инструкции сравнения, перехода и умножения в точном соответствии с исходным кодом. -- **-O1** — базовые оптимизации: структура цикла сохраняется, удаляются лишние операции. -- **-O2** — полное развёртывание цикла (loop unrolling): вместо цикла — последовательность умножений; инструкции сравнения и переходов отсутствуют. -- **-O3** — дополнительно применяется сворачивание констант (constant folding): при известных входных данных компилятор подставляет готовый результат (например, для `x = 5` — значение `120`). \ No newline at end of file diff --git a/C(system program)/Практическая 2/2.1.png b/C(system program)/Практическая 2/2.1.png deleted file mode 100644 index 2818cf3..0000000 Binary files a/C(system program)/Практическая 2/2.1.png and /dev/null differ diff --git a/C(system program)/Практическая 2/2.2.png b/C(system program)/Практическая 2/2.2.png deleted file mode 100644 index 6db346a..0000000 Binary files a/C(system program)/Практическая 2/2.2.png and /dev/null differ diff --git a/C(system program)/Практическая 2/2.md b/C(system program)/Практическая 2/2.md deleted file mode 100644 index 10d2d78..0000000 --- a/C(system program)/Практическая 2/2.md +++ /dev/null @@ -1,14 +0,0 @@ -## Лаба 02 -```C -#include -#include -void main(){ - uint32_t magic = 0xAABBCCDD; - uint8_t*byte_ptr = (uint8_t*) & magic ; - printf("Byte 0: 0x%02X\n", byte_ptr[0]); - printf("Byte 1: 0x%02X\n", byte_ptr[1]); - printf("Byte 2: 0x%02X\n", byte_ptr[2]); - printf("Byte 3: 0x%02X\n", byte_ptr[3]); -} - -``` \ No newline at end of file diff --git a/C(system program)/Практическая 2/readme.md b/C(system program)/Практическая 2/readme.md deleted file mode 100644 index 07034ea..0000000 --- a/C(system program)/Практическая 2/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -### Ex2 2.1 -![solution ex1](2.1.png) - -### Ex2 2.2 -![solution ex2](2.2.png) - - - - diff --git a/readme.md b/readme.md index 85b3beb..374511a 100644 --- a/readme.md +++ b/readme.md @@ -31,5 +31,6 @@ | № | Наименование работы | Ссылка | Статус | | :-: | :--- | :-: | :-: | -| 01 | Практическая работа №1 | [Перейти](./C_system_program/practical-1) | Завершено +| 01 | Практическая работа №1 | [Перейти](./C/lab-01) | Завершено +| 02 | Практическая работа №2 | [Перейти](./C/lab-02) | Завершено ---