From f68782021bf7844d208e0ec0a6499965f8270599 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 9 Feb 2026 03:44:20 +0100 Subject: [PATCH] zd --- AcquiringLand/Fundamentals/bad_practice.c | 28 ----------------------- 1 file changed, 28 deletions(-) delete mode 100644 AcquiringLand/Fundamentals/bad_practice.c diff --git a/AcquiringLand/Fundamentals/bad_practice.c b/AcquiringLand/Fundamentals/bad_practice.c deleted file mode 100644 index e1cb87a..0000000 --- a/AcquiringLand/Fundamentals/bad_practice.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include - -int *division(int input, int by) -{ - - //int value = input / by; - if (by != 0){ - //int value = input / by; - } - else - return - - //int value = 0; - int *ptr = &value; - return ptr; -} - -int main(void) -{ - int *ptr1 = division(42, 2); - printf("the 1st value is %d\n", *ptr1); - int *ptr2 = division(12, 0); - printf("the 2nd value is %d\n", *ptr2); - free(ptr1); - free(ptr2); - return EXIT_SUCCESS; -}