Algorithms and Programming II.

Teachers

Included in study programs

Teaching results

After completing the course, students will have:
Knowledge
A. To understand the fundamental principles of procedural programming in the C language.
B. To be familiar with the syntax of C and with the semantic foundations of procedural programming within an integrated development environment.
C. To understand how to analyse a programming task, design an algorithm and translate it into C source code.
Skills
D. To implement a designed algorithm using the syntactic rules of C and the procedural programming paradigm.
E. To identify and remove syntactic and semantic errors in the source code.
F. To analyse program behaviour using the debugger of the integrated development environment with appropriate test inputs.
G. To compile a tested source code solution into a final executable program for the target operating system and hardware platform.
H. To prepare technical documentation describing the designed solution to the programming task.
Competentness
A. To independently analyse a programming task and propose an appropriate algorithmic solution.
B. To adhere to procedural programming principles and write functional, readable and logically consistent C source code.
D. To systematically test the program, diagnose errors and optimise the behaviour of the application.
G. To present and defend developed programming solutions at a professional level.
H. To document the final solution in a form usable for both end users and other developers.

Indicative content

1 Introduction to algorithms and algorithmization
2 Source form of a program created in the C language
3 The process of building a program created in the C language, properties of the C language
4 Input and output from and to programs created in the C language
5 Control structures used to control the flow of a program created in C
6 One-dimensional, multidimensional arrays and strings in a program created in C
7 Pointer and dereferencing the pointer in a program created in C language
8 Functions in a program created in the C language
9 Recursive functions in a program created in the C language
10 Programmer-defined data types in a program created in C
11 Structures, and structured variables in a program created in C
12 Casting data types of expression operands in a program created in C
13 Working with a disk file in a program created in C

Support literature

Archer, T. (2002). Myslíme v jazyku C. Grada. ISBN 80-247-0301-7
Chudá, D., Juríková, L., Medveďová, E., & Turňa, Ľ. (2006). Programovanie v jazyku C. Ekonóm. ISBN 80-225-2186-8
Dostál, R. (2009). C/C++ hotová řešení. Computer Press. ISBN 978-80-251-2190-0
Hanák, J. (2011). Programovaní v jazyce C. Computer Media. ISBN 9788074020414
Jena, S. K. (2024). C programming: Learn to code. Chapman & Hall/CRC.
Jurík, P. (2019a). Programovanie v jazyku C rýchlo a jednoducho. Merkur. ISBN 978-80-89996-01-8
Jurík, P. (2019b). Programovanie v jazyku C++ rýchlo a jednoducho. Merkur. ISBN 978-80-89996-02-5
Kernighan, B. W., & Ritchie, D. M. (2006). Programovací jazyk C. Computer Press. ISBN 802510897X
Sedgewick, R. (2003). Algoritmy v C. SoftPress. ISBN 80-86497-56-9
Virius, M. (2011). Jazyky C a C++. Grada. ISBN 9788024739175

Syllabus

1. Introduction to the C language syntax and procedural programming principles. (History and relevance of the C language. Basic structure of a C program. Fundamental concepts of procedural programming. Comparison with other paradigms.) 2. The source structure of a C program. Comments, headers, and code blocks. (Syntax rules – variables, operators, block structure. Declarations vs. definitions. Style and readability of the source code.) 3. The compilation process and key characteristics of the C language. (Compiler, linker, Makefiles. Compilation stages – preprocessing, compiling, linking. Memory-level access and system-level programming characteristics.) 4. Input and output in C using stdio.h. (Usage of printf, scanf, formatted input/output, working with console input/output. Debugging tips for I/O operations.) 5. Control structures in C. Conditional branching and loops. (if, switch, while, for, do...while. Logical operators. Practical examples of conditional logic and repetition control.) 6. Arrays and strings. One-dimensional and multi-dimensional arrays. Character strings. (Declaration, initialization, indexing. Basic operations on arrays. String manipulation using the string.h library. Algorithmic use cases.) 7. Pointers and dereferencing in C. Working with memory addresses. (Concepts: address, reference, dereference. Pointers to variables, arrays, and functions. Understanding the link between arrays and pointers.) 8. Functions in C – declaration, definition, and calling. (Function structure, return values, parameter passing. Call by value vs. call by reference. Code modularity and reuse.) 9. Recursive functions in C. (Definition and use of recursion. Classic examples: factorial, Fibonacci numbers. Stack behavior in recursive calls. Comparison with iteration.) 10. User-defined data types – typedef and enumerated types (enum). (Motivation for custom types. Type aliases, use of enums for readable and structured code design.) 11. Structures and structure variables. Complex data types. (Definition and use of struct. Nested structures and pointers to structures. Modeling complex entities in programs.) 12. Type casting and operand compatibility in expressions. (Implicit and explicit casting. Consequences for expression evaluation. Solving type mismatch issues in arithmetic and logic expressions.) 13. Working with disk files in C. File input/output. (Functions: fopen, fclose, fprintf, fscanf, fgets, fputs. Reading and writing in text and binary modes. Data persistence to files.)

Requirements to complete the course

Exercises (40% of course evaluation)
The content of the exercise is the solution of assigned programming tasks. In addition to these tasks, students solve independent home programming assignments thematically related to lectures and solved programming tasks from exercises. Students comment on their solutions to independent home assignments with their technical descriptions, and they defend them in a possible discussion in front of other students of their study group. The solutions of independent programming assignments of students are evaluated (10% of the course evaluation). By solving and evaluating independent home assignments, the achieved level of the B, C, D, E, F, G, H educational results is verified. During the exercises, students complete an independent written work, solving a programming task in an integrated development environment, which is evaluated (30% of the course evaluation). By solving and evaluating the problem task from the independent written work, the achieved level of the C, D, E, F educational results is verified.
Exam (60% of the course evaluation)
The exam consists of two parts:
- from an independent exam written work, solution of a programming task in an integrated development environment, and defense of this solution (50% of the course evaluation). By solving and evaluating the problem task from the independent exam written work and defending this solution, the achieved level of the C, D, E, F, G educational results is verified.
- from the oral part, where students answer theoretical questions from the basics of algorithmization of programming tasks, a syntax of the C language and from the principles of procedural programming in the C language (10% of the course evaluation). The oral part of the exam and its evaluation verifies the achieved level of the A and B educational results.

Student workload

Total study load (in hours): 7 credits x 26 hours = 182 hours
Distribution of study load
Participation in seminars: 52 hours
Preparation for seminars: 26 hours
Written assignments: 12 hours
Preparation for written work: 30 hours
Exam preparation: 62 hours

Language whose command is required to complete the course

slovak

Date of approval: 04.03.2025

Date of the latest change: 06.11.2025