Requirements:
- An active participation on at least 70% of the labs. A maximum of 4 absences are allowed. In the lab, sufficient preparation will be checked every week via an entrance test in the first 5 minutes of the class. The entrance test can not be taken later. An unsuccessful entrance test (or a missing one, due to late arrival) is equivalent with an absence. Those who don't work on the lab exercises receive an absence, too.
- A participation on at least 70% of the classroom practices. A maximum of 4 absences are allowed.
- Small tests are short mid-term tests written at the classroom practice at a pre-announced time. From the 6 small tests written in total, only 4 are taken into account, those that have the highest score. Small tests can not be re-taken. the best 4 short test must reach 50% overall (20 points out of 40) to pass the subject.
- There will be two big tests in the semester. These are major mid-term tests where more complex programming tasks are to be solved. The combined score of the two big tests must reach 50%. Alternatively, instead of summing the scores of the two big tests, twice the score of the second big test will be taken into account, if it is higher. From the two big tests, the one with lower score (and only that one) can be re-taken in the re-take period.
- Long-term homework assignment – find the page in the menu for the details. The deadline for delivering the final solution is the end of week 13. The score for the HW must reach 50%.
Calculation of the final mark (given that the attendance requirements are fulfiled):
Final score = max(BigTest1 + BigTest2, 2 × BigTest2) + sum(best4(SmallTest1, ..., SmallTest6)) + Homework Project
The grades are determined as:
failed | passed 2 | satisfactory 3 | good 4 | excellent 5 |
---|---|---|---|---|
0–69 | 70–89 | 90–109 | 110–124 | 125– |
- Small tests can not be retaken.
- Entrance tests can not be retaken.
- Lab and practice absence issues can not be omitted later.
- One big test (the one with lower score) can be re-taken, in the re-take week.
- The HW can be delivered on week 14, paying an extra fee. The milestones can not be retaken simply those points are lost but the HW can still be accepted if it fulfils the requirements.
- Those who entered the country late and therefore miss the first weeks will receive attendance after showing acceptance of the Neptun request to the lab/practice tutor.
The solution of the HW assignment must be a complex program that demonstrates the use of the language elements, algorithms and data structures learnt during the semester. The source files of the program and the whole ducumentation are to be zipped and uploaded at the portal and must be presented to the lab conductor. The maximum score is 20.

There are certain errors that apparently indicate the lack of basic knowledge. Such errors are called fundamental errors. Committing any of them in the homework results in a deduction of 2 points for each of them. These errors are the following:
- A) Repetitive patterns, „copy paste”s, dittoing
- ... instead of using a trivial loop, array, function:
int a, b, c, d, …; scanf("%d", &a); “ ("%d", &b); “ c); … printf("%d", c); “ ("%d", b); “ ("%d", a);
dittoing
int sz[10]; for (int i = 0; i < 10; ++i) scanf("%d", &sz[i]); for (int i = 9; i >= 0; --i) printf("%d", sz[i]);
array and loop
Counterexamples. It is not that everything of which there are more than one should be stored in an array:
- Factors of a quadratic equation:
double a, b, c
it is OK – it is used in math, too. - Names of parents:
struct Parents { char dad[100+1]; char mom[100+1]; };
- Factors of a quadratic equation:
- B) Unwanted I/O instead of function parameter/return value
- Using I/O operation (scanf/printf) instead of function input parameters and return value requested in the problem.
Like „write a function, which decides if the recived number is even”:
void is_even(int num) { if (num % 2 == 0) printf("even"); // ?! }
this is not the requested function
bool is_even(int num) { return num % 2 == 0; }
this is it
Counterexample. The above error is fundamental because the printing tried to replace the requested return operation. For example a debug print or printing an error message is not:
ListElem * list_read(void) { FILE *fp; fp = fopen("names.txt", "rt"); if (fp == NULL) { printf("Could not open the file!"); // not a fundamental error return NULL; } }
- C) Bitwise operations vs. floating point arithmetits
-
Using
pow()
function in a problem with bitwise operations. Thepow()
function usesdouble
values, not integers. Any further operation will result in a floating point value that is not valid for certain operators (like|
,%
) . The result can be inaccurate, too.The same way it is a principle error to avoid bitwise operations by unpacking the bits into arrays and repacking the result.
- D) Mixing arrays and pointers
- Creating an array of undefined size; using an array when a pointer is needed or vica versa.
char string[]; // size? gets(string); char *string; // where does it point to? gets(string);
- E) Pointer as a strange local variable
- A fundamental error is the belief that a pointer is a very special local variable,
which must always point to a memory location. Like each pointer must have a
malloc()
call:ListElem *iter; iter = (ListElem*) malloc(sizeof(ListElem)); // ?! for (iter = list; iter != NULL; iter = iter->next) { ...; } free(iter);
- F) Mixing data structures and their typical operations
-
An array or a pointer to it must be indexed, traversing a linked list means jumping along
next
pointers, operating a binary tree involves recursion.If someone tries to index a head pointer of a list, or tries to traverse a tree using two loops, it is a proof of total lack of knowledge how these data structures work. These and similar mistreating of data structures are fundamental mistakes.