(PSEUDO-)RANDOM NUMBERS 1) use default rand() function for generating A array with 100 random integers https://www.tutorialspoint.com/c_standard_library/c_function_rand.htm 2) what is the seed and its function (check what is srand doing), random vs. pseudorandom generators https://linuxhint.com/rand-function-in-c-language/ 3) name three application of using randomness in computer science 4) read about Middle-square method and implement it in C in two versions (https://en.wikipedia.org/wiki/Middle-square_method) a) version based at math Hint: use modulo division b) version based at string conversion use for instance "long long", "sprintf", "atoll", "strncpy" https://www.w3schools.com/c/c_strings.php https://www.tutorialspoint.com/c_standard_library/c_function_sprintf.htm https://www.geeksforgeeks.org/atol-atoll-and-atof-functions-in-c-c/ https://cpp0x.pl/dokumentacja/standard-C/strncpy/435 Note: for implementation simplicity restrict your code to 6-digits numbers * If you consider the task too simple, make general version that can work at any digit numbers Extra task: count after how many iterations the cycle starts to reapeat (periodicity) 5) read about Mersenne Twister https://en.wikipedia.org/wiki/Mersenne_Twister Check also: https://en.wikipedia.org/wiki/List_of_random_number_generators https://en.wikipedia.org/wiki/Category:Pseudorandom_number_generators 6) Unix basic stuff: a) /dev/random & /dev/urandom & 'od' https://en.wikipedia.org/wiki//dev/random https://www.thegeekstuff.com/2012/08/od-command/ b) /dev/shm (e.g. use 'df -h', 'df -i' commands) https://en.wikipedia.org/wiki/Shared_memory#Support_on_Unix-like_systems c) aliases and .bashrc https://pl.wikipedia.org/wiki/Alias_(Unix) TODO: create some aliases d) crontab https://pl.wikipedia.org/wiki/Crontab https://en.wikipedia.org/wiki/Cron TODO: using cron write current date&time to the file located in /tmp/date_cron.log every minute (next, every odd minute, etc.) General conclusion: Use rand() while implementing and testing your code, generating matrices with psuedo-numbers, etc. HOMEWORK "O porzadkach (anty)leksykograficznych" https://moodle.mimuw.edu.pl/pluginfile.php/286320/mod_resource/content/1/Cwiczenia_WdI_.G1-2_16-18.10.23.pdf https://moodle.mimuw.edu.pl/pluginfile.php/288151/mod_resource/content/2/main.c https://moodle.mimuw.edu.pl/pluginfile.php/288152/mod_resource/content/1/main.c