Belépés címtáras azonosítással
magyar nyelvű adatlap
angol nyelvű adatlap
Basics of Programming 1
A tantárgy neve magyarul / Name of the subject in Hungarian: A programozás alapjai 1
Last updated: 2017. augusztus 23.
D. of Electron Devices
A fenti forma a Neptun sajátja, ezen technikai okokból nem változtattunk.
A kötelező előtanulmányi rendek grafikus formában itt láthatók.
The main objective of this course is to
provide students with appropriate skills in computer-based problem solving and
basic use of its tools. This skills are to be effectively applied during
Learning a high-level programming language
the C language allows students to reach these goals in practice. The classroom
practice follows the syllabus of lectures; helps better understand the topics
of the lecture through detailed examination of the algorithms.
The classes are completed with a long-term
individual homework assignment to help improve the students' skills.
Introduction: Concepts of Programming.
Expressions and variables, the type concept. C Language Reference. Simple
expressions in the program.
Practice: Everyday algorithms. Create a
flowchart-like diagram of well known algorithms (e.g., written addition,
subtraction, prime factorization using pen and paper).
Laboratory: Introduction to the computer
lab, to the system, and to the structure of the university network. Operating
System basics: command line program can be started from the command line, its
Lecture: Elements of the Source Code.
Algorithm: definition and description. Cycle (loop), branching, sequence.
Combination of these. Complex control structures, complex expressions. Computer
Practice: Exercise algorithms with a deck
of cards as an example. Find a given card. Which is the lowest/highest? How can
Laboratory: Introduction of an Integrated
Development Environment. Compilation of simple programs. Basics of debugging,
monitoring the assignment to variables. Editing the program source and
compilation. The compiler error messages.
Lecture: Pseudo code / C versions of simple
algorithms. Theorems of Summation and Search of extremum. Simple types.
Character and logical types. Arrays.
Practice: Algorithms in C language
description. Examples from Number theory. Quadratic equation. Numerical
methods, e.g. calculation of pi using loops. Several versions of 'is this a
prime number'. Palindrome numbers.
Laboratory: Coding simple algorithms from a
Pseudo code / structogram representation. Programs with simple I/O. printf,
scanf, format strings.
Lecture: Built-in types in details. Finite
numerical representation. Integer and floating-point representation of numbers,
limits. Concept of functions and their use. Abstraction, function arguments,
Practice: Exercise tasks that can be solved
using arrays. Calendar, leap years. The sieve of Eratosthenes.
Laboratory: Exercise simple algorithms.
Nested loops. Multiplication table, 'draw' a rectangle. Programming of known
algorithms (eg, prime, gcd). Find my Number (guess, smaller, bigger).
Lecture: Operators: precedence, evaluation,
side effects. Compound data, structures, defining user types.
Practice: Complex problems, decomposition.
Functions, parameters and return values. Writing simple math-like functions. My
toupper, Caesar encryption.
Laboratory: The basics of array handling.
Creating arrays. Search, count the number of pairs in it, etc.. Demonstration
of out-of-range indexing of an array.
Lecture: Enumerated type. State machine.
Pointers and indirection, passing variables by address. Strings.
Practice: Structures. 3D vector structure.
Operations and functions. More complex data types: array of structure, array in
Laboratory: Bit functions. Dump number in
binary form. Bit-pattern generation, c = set(c, 5). Effect of overflow.
Determination of the bits of an integer. Demonstration of floating point
Lecture: Communication between the program
and the outside world. Pre-processing. Program Segmentation. Writing maintainable
Practice: Using Arrays and functions,
arrays as function parameters. String algorithms. Text reverser, palindrome.
String as function parameter. Array size and the length of a string. Risk of
indexing out of range.
Laboratory: Built-in string processing
functions. Handling arrays - more exercise. Multi-dimensional arrays.
Lecture: Array algorithms. Searches. Sorts.
Recursion and quick sort.
Practice: State machine design examples,
details of implementation. TH counter, comment filter.
State machine coding. Redirect input from
file and/or to file. TH counter, comment filter. Pattern Recognition.
Lecture: Dynamic memory management. Dynamic
arrays. Dynamic encoding of a string. Systematic discussion of memory handling.
Practice: Sorting an array. Median search.
N smallest items. Interval of identical elements. Sorting keys. Cards: array of
structures, sorting by suit or by rank.
Laboratory: Coding of recursive functions.
Fibonacci series, iteratively and recursively. False recursion, printing of a
number. True recursion, coloring shapes.
Lecture: Dynamic data structures: linked
lists. List algorithms. Traversal, deletion, insertion.
Practice: Coding a complete user type: Set.
Work with Dynamic arrays. Storing the size, search, resize. Work with pointers
Laboratory: Array algorithms, pointers.
Search and Sort implementations. Using multiple module source, decomposition.
Lecture: Trees, using binary trees. Search
trees, decoding trees. Traversing trees. Search trees, decoding trees. Multiple
indirection. Introduction to hash tables.
Practice: Choosing a data structure. Lists;
re-linking the elements, memory management.
Laboratory: Implementation of list
handling. Building a list. Writing to a file, reading from a file. Application
of a sentry. Insert, delete.
Lecture: Function pointers. Designing a
function plotting program. Union, bit-field.
Practice: Recursive functions. Tree
algorithms. Nodes, levels of a tree (depth), leaves. Analysis of symmetrical
Laboratory: File management, for example:
writing an array into file and reading back. Programs split to multiple
modules. Processing of command line arguments. File copy.
Lecture: More data structures. Design of
large programs. Functional decomposition of a complex project.
Practice: Function pointers. Numerical
Laboratory: Binary tree handling.
Practice and Laboratory: practice and
There are two lectures and two classroom
practices every week. There are two computer laboratory practices every week.
Mid-semester mark is given to those
students who completed all assessments. The mark is based on the sum of the
score of the two mid-semester tests (2×40), and the score of the selected small
tests (3×10). The individual homework is worth 20 points. The maximum therefore is 130 points. If the assessments are completed, the student passes the course.
There is no repeat possibility neither for
The small tests are repeated during the
semester, as the maximum score of each pair is taken automatically. One small
test can be repeated at the end of the semester, by the end of the repeat week.
The mid-term tests can be repeated at the
repeat week. Only one of the two mid-term tests can be repeated, and it must be
the one with the lower score. The new score will overwrite the old one.
For the homework assessment, late delivery
is accepted by 12:00 of the last day of the semester (Friday of week 14) while
paying a late delivery fee. Beyond week 14 there is no way to deliver a
Consultation: the usual way is via e-mail.
Personal consultation is also possible based on reconciliation with the teacher.
Preparation for lectures
Preparation for test
Learning of prescribed matters
Preparation for exam
Dr. Czirkos Zoltán
Programming co-operative of departments of
Faculty of Electrical Engineering and Informatics.