1.0.2 2026-02-02 10:42 2026-02-09 10:42 submit-* (limit: 3 per practical) archi-* (limit: 2 per hour) prog-103-p-03-2030-firstname.lastname
├── AcquiringLand
│ ├── Fundamentals
│ │ ├── bad_practice.c
│ │ ├── insert_string.c
│ │ ├── itoa.c
│ │ ├── join_strings.c
│ │ ├── leaks.c
│ │ ├── magic_arrays.c
│ │ ├── minefield.c
│ │ └── trespass.c
│ └── Proficiencies
│ ├── normalize_array.c
│ ├── split_by_sum.c
│ └── unique_words.c
├── .gitignore
└── README
firstname.lastname with your login. .gitignore file is mandatory. Tests folder. malloc, realloc, and free, and more importantly, how to manage this land responsibly!#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
man stdio.h (or replace it with any other built-in command or library name) to view its manual page.man 3 <function> to have the documentation of the function you want.; of course). Otherwise, your code will not be tested.Fundamentals/itoa.c my_itoa function.value, including the minus sign if the value is negative.int get_number_length(int value);
get_number_length(7); //1
get_number_length(-97163); //6
get_number_length(82622); //5
value and convert it to a string.value.malloc(3) or calloc(3) fails, you must return NULL.get_number_length() function you just implemented.atoi(3) from <stdlib.h>.char *my_itoa(int value);
my_itoa(-172); // "-172"
my_itoa(2); // "2"
my_itoa(-2829302); // "-2829302"
Fundamentals/minefield.c minefield.c given in the assets.tar.gz.-fsanitize=address.-fsanitize=address with the -g flag.-g flag tells the compiler to include debug symbols in the executable.gdb) to:-g, we would have:ERROR: AddressSanitizer: heap-buffer-overflow
at 0x7f3c2a1b...
-g, it transforms in:ERROR: AddressSanitizer: heap-buffer-overflow
at minefield.c:142
in problematic_function
key2: value2
key1: new_value1
Retrieved key1: new_value1
key1: new_value1
Everything is ok!
main.main function in the file, it will not cause any issues.assets.tar.gz archive from the intranet or use git restore <file> to restore the file to the last commit made on your repository.Fundamentals/trespass.c trespass.c given in the assets.tar.gz.this is a string!
main.main function in the file, it will not cause any issues.assets.tar.gz archive from the intranet or use git restore <file> to restore the file to the last commit made on your repository.Fundamentals/leaks.c leaks.c given in the assets.tar.gz.memory leaks.malloc(3) in a loop).memory leaks!main.main function in the file, it will not cause any issues.assets.tar.gz archive from the intranet or use git restore <file> to restore the file to the last commit made on your repository.Fundamentals/bad_practice.c bad_practice.c given in the assets.tar.gz.-fsanitize=undefined. This sanitizer will help you detect the visible error and provide a clear error message.the 1st value is 21
the 2nd value is 0
main.main function in the file, it will not cause any issues.assets.tar.gz archive from the intranet or use git restore <file> to restore the file to the last commit made on your repository.Fundamentals/insert_string.c strings_array of size array_size. insert_str at position index in the array.index is out of range (less than 0 or greater than or equal to array_size), insert_str must be inserted at the beginning of the array.array_size must be updated.strings_array is NULL, you should return NULL and do nothing.main() function with your tests as this will give you even more practice using malloc(3).char **insert_string(char **strings_array, int *array_size, char *insert_str, int index);
input: {"This", "is", "a", "long", "example"}; insert_str = "very"; *array_size = 5; index = 3;
output: {"This", "is", "a", "very", "long", "example"}; *array_size = 6;
input: {"too", "short", "example"}; insert_str = "out"; *array_size = 3; index = 6;
output: {"out", "too", "short", "example"}; *array_size = 4;
Fundamentals/join_strings.c strings of size count.' ').strings once you don't need it anymore.strings is NULL, you should return NULL and do nothing.char *join_strings(char *strings[], int count);
input: {"Hello", "from ", "Java", "swimming pool"}; count = 4;
output: "Hello from Java swimming pool"
input: {"ACDC", " are ", "the", "best"}; count = 4
output: "ACDC are the best"
Fundamentals/magic_arrays.c input of size n.value1, count1, value2, count2, ... } out_size argument.input is NULL, you should return NULL and do nothing.int *compress_array(const int *input, int n, int *out_size);
input: {3, 3, 3, 1, 1, 5, 5, 5, 5}; n = 9;
output: {3, 3, 1, 2, 5, 4}; *out_size = 6;
input: {1, 2, 3, 5, 4}; n = 5;
output: {1, 1, 2, 1, 3, 1, 5, 1, 4, 1}; *out_size = 10;
Proficiencies/split_by_sum.c input of size array_size.threshold.out_size.input = {4, 2, 3, 5, 6}; array_size = 5; threshold = 6;threshold, nothing happensthreshold, add the index of the value 2 (index = 1) to your array, and reset your sum.threshold, nothing happensthreshold, add the index of the value 5 (index = 3) to your array, and reset your sum.threshold, add the index of 6 (index = 4) to your array.{1, 3, 4} and it's final size in out_size. threshold is never met, you should return NULL.input or out_size are NULL, you should return NULL and do nothing.array_size or threshold are less or equal to 0, you should also return NULL and do nothing.int *split_by_sum(const int *input, int array_size, int threshold, int *out_size);
input : {1, 2, 3, 2, 2}; array_size = 5; threshold = 3;
output : {1, 2, 4}; *out_size = 3
input : {1, 2, 3, 2, 2}; array_size = 5; threshold = 12;
output : {}; *out_size = 0
Proficiencies/unique_words.c input containing multiple words separated by one or more spaces.out_size.input or out_size are NULL, you should return NULL and do nothing.char *unique_words(const char *input, int *out_size);
input: "hello world hello c world"
output: "hello world c"; *out_size = 13
input: "This is another wei#d d test test"
output: "This is another d test"; *out_size = 22
strcmp(3) or its sister function strncmp(3), both from the string.h headerisdigit(3), isalpha(3), or isalnum(3) from the ctype.h headerProficiencies/normalize_array.c strings_array is a pointer to an array of strings which explains why it's type is char ***.array_size and normalizes each string by removing all leading and trailing spaces." an example " -> "an example"
unwanted_char, the string must be completely removed from the array.array_size must be updated.array_size should be set to 0.NULL array.void normalize_array(char ***strings_array, int *array_size, char unwanted_char);
input : *strings_array = {" an example ", " we_said_no_0", "normal", " _ "}; *array_size = 4; unwanted_char = '_';
output : *strings_array = {"an example", "normal"}; *array_size = 2;
input : *strings_array = {" make ", "yourrrrrr ", " ", " o w n", " TESTS "}; *array_size = 5; unwanted_char = 'e';
output : *strings_array = {"yourrrrrr", "o w n", "TESTS"}; *array_size = 3;
1.0.2 ] 2026-03-13 18:35:00 split_by_sum.c > split_by_sum : And finally if n or threshold are less or equal to 0... -> And finally if array_size or threshold are less or equal to 0... 1.0.1 ] 2026-02-13 18:32:00 split_by_sum.c > split_by_sum : If the threshold is never met, you should return an empty array -> If the threshold is never met, you should return NULL.