Working with the files in C a) Read about files I/O and strings e.g. https://www.programiz.com/c-programming/c-file-input-output https://www.programiz.com/c-programming/c-strings https://www.programiz.com/c-programming/examples/frequency-character https://www.programiz.com/c-programming/c-file-examples https://www.tutorialspoint.com/cprogramming/c_file_io.htm https://www.codingame.com/playgrounds/14213/how-to-play-with-strings-in-c/what-is-a-string-in-c https://www.tutorialkart.com/c-programming/c-read-text-file/ https://www.tutorialkart.com/c-programming/c-file-operations/ https://www.tutorialspoint.com/c_standard_library/c_function_fprintf.htm b) Write a program that will read the 'data.txt' file and process it in such a way that it will save only the words starting with 'a' letter (case-sensitive) omitting all other words. The order of lines should be preserved (the same as in the input file). The result should be stored in 'result.txt' file. For instance for the file: "alexa ola as ela cos aleksander" The result.txt should be: "alexa as aleksander" Useful functions: fopen, fscanf, fprintf, fgets, fgetc, puts, strncat, strtok, getline, malloc, etc. ps. do not forget about fclose c) Write the function which given the input text file and the number 'k' will return 'True' if the number of words of length > 'k' is bigger than the number of words with length smaller or equal to 'k'. Otherwise, the function should return False. The word ends with white space, EOF, EOL.* Input: data2.txt (create it in Notepad) and k (integer) Output: True/False Additional condition: 'k'>1 *Read about ('\r\n', '\n' vs. Windows, Mac, Linux) Send to lukaskoz@mimuw.edu.pl an email with the subject "lab6 NameSurname WI 2023" (e.g. "lab6 LukaszKozlowski WI 2023", without polish letters) and the attachments: - Ex.2b as NameSurnameLab6_2b.tar.gz (only c file) - Ex.2c as NameSurnameLab6_2c.tar.gz (c code and two input files, not more than 20 lines of max 200 chars per line in each file). Deadline: 20.11.2023 16:00 (CET) (Monday's group) or 22.11.2023 (Wednesday's group) =================================================================================== Extra reading: Get familiar with files such as: *.csv (*.tsv), *.json, *.xml These are the most frequently used types of files for storing the data. All programming languages have libraries ready to read&write those formats and you will constantly use them in the future. ================================================================================== Extra material: Explore Moodle Grupy 1 i 2. Pliki tekstowe: wczytywanie i wypisywanie. https://moodle.mimuw.edu.pl/pluginfile.php/290551/mod_resource/content/5/main.c Grupy 1 i 2. Pliki: wczytywanie i wypisywanie tablic. https://moodle.mimuw.edu.pl/pluginfile.php/290552/mod_resource/content/7/main.c a) Zwracanie najdluzszego palindromu z pliku "dane.txt". Palindrom jest to slowo ktore czytane od lewej strony do prawej i od prawej strony do lewej brzmi tak samo. Na przyklad "kajak". b) Przepisz plik "dane.txt" na plik "wynik.txt" usuwajac nadmiar spacji (' ') tzn. ciagi spacji zastapic jedna i wszystkie tabulatory ('\t'). c) Przepisz plik "dane.txt" na plik "wynik.txt" usuwajac puste linie. Rozwiazania (a-c) https://docs.google.com/document/d/1PY3mYJilUuAA1_F_WjUCYdJTWvUGak79WOaSAsam0HI/edit Sample exercises https://moodle.mimuw.edu.pl/pluginfile.php/290909/mod_resource/content/2/Cwiczenia_WdI_.G1-2_13_15.11.23.pdf