Content
The test covers materials up to the second part of the dynamic memory topic (realloc), inclusive. The test emphasizes the correct use of the topics covered. Increased focus is placed on reading data from a file, pointers, structures, code structuring, and the use of dynamic memory.
The data file used in the coding task will be provided by the instructor along with a description of its structure. The application must work correctly with data files that have the same structure but varying lengths.
The algorithmic part of the test includes typical tasks such as finding extremes, counting, filtering, sorting, unit conversions (time, speed, length, …), string processing, calculating statistical indicators (sum, arithmetic mean, percentage, standard deviation, …), using formulas, etc. The list is indicative and not exhaustive!
Your solution will be compiled on a Linux environment equivalent or newer to the lab computers, using gcc as the compiler (version 13 or newer) and the GNU99 ( -std=gnu99) standard . If a Makefile is provided, the student’s Makefile will be used to compile the application using the make all command.
Organization
The test may only be written in the classroom, on a lab computer. The test is individual.
The set of tasks will be given to the student at the beginning of the test on one or more task sheets. Task sheets must be returned at the end of the test, with your name and student code written on each page.
During the test, questions will only be answered if they relate to understanding the content and requirements of the tasks or technical issues not related to the task itself (e.g., how to change the keyboard language).
Bring an ID and a pen to the test. Optionally, you may also bring a markers, pencil, eraser, … Paper to write down your ideas and drafts will be provided by us.
During the test, you are allowed to
- Use materials (slides, notes, code examples, your homework, lab task solutions, ..) that have been prepared in advance and saved on the P drive, on a USB stick, or on paper.
- Use the computer in the lab and the installed software package (including Linux man pages).
- Use the following online resources:
- Lab materials page: https://blue.pri.ee/ttu
- C language reference: https://en.cppreference.com/w/c.html
- Moodle content under the Programming 2 course
During the test, you are NOT allowed to
- Use personal electronic devices (phone, laptop, etc.), except for a calculator
- Use online services not listed in the allowed resources
- Use AI-based solutions
Use of prohibited external assistance will result in failing the test.
Submission
The solution created during the test must be submitted in full on Moodle. All code files must be submitted, including the Makefile if necessary.
The theory part of the test can be submitted either handwritten, on paper, or digitally as a text file. When submitting digitally, the answers to the theory questions must be uploaded to Moodle alongside the rest of the solution.
You may write answers, notes and highlights on the task sheets. It is mandatory to write your name and student code on the task sheet.
Test time and duration
The test will take place during the regular lab session according to the weekly schedule.
Up to two retake attempts are allowed
- During the consultation session in week 13 or 14 (notification will be given via Mattermost).
- During the lab session in week 16.
The test duration is approximately 2 hours and 45 minutes.
Test grading
The test gives a total of 250 points, which is divided between different tasks (theory and practical coding assignments). The test result is a part of the exam prerequisite.
The coding part of the test is graded in three different categories.
Code quality, which evaluates
- The use, structure and contents of header files
- Appropriate use of structures and enumerations
- Splitting code into reusable functions
- Code readability
- Code compilation, including compliance with standards.
Code functionality, which evaluates
- Whether the application contains errors
- Whether and to what extent the application fulfills the given task
- Whether the application’s behavior and output are understandable
Memory usage, which evaluates
- Use of dynamic memory, including freeing of the memory
- Reading of data files with undefined length
- Data integrity
The cumulative score for each category will be presented in the Moodle test feedback.
Test result and feedback
The test results are published on Moodle. The Moodle grade sheet also includes test feedback, which contains the cumulative scores for each evaluated subcategory.
To receive more detailed feedback, you must contact the instructor and arrange a time to review the work.