Course detail

Introduction to Programming

FEKT-BPC-UDPAcad. year: 2021/2022

The first part of course familiarizes students with basis of data storage in computer (integer number, floating point numbers, IEEE 754-2008 standard), binary arithmetic, characters coding (ASCII, ISO-8859-X, UNICODE), binary-to-text encoding (Quoted-Printable Encoding, BASE64), Von Neumann principles and concept of the computer, OS basis principles. The second part is focused on foundations of C language programming. The students should learn to use simple variables, operators, assignment commands, branch statements, programming of loops, employ functions, arrays, structures and pointers.

Language of instruction

Czech

Number of ECTS credits

7

Mode of study

Not applicable.

Learning outcomes of the course unit

Graduate should be able to:
- express the number in the various numeral systems,
- express decimal number by IEEE 754-2008 standard,
- express character in ASCII, ISO-8859-X, UNICODE (UTF-32, UTF-16, UTF-8) coding,
- code binary octet string by BASE64 standard, decode BASE64 text,
- utilise base Linux/UNIX command,
- describe basic and structured C language data types,
- apply C language statements and operators,
- create and call C functions,
- design simple algorithm and create C program for it.

Prerequisites

Not applicable.

Co-requisites

Not applicable.

Planned learning activities and teaching methods

Techning methods include lectures and computer laboratory lectures. Students have to create assignments during the computer laboratory lectures.

Assesment methods and criteria linked to learning outcomes

Up to 50 points for the laboratory lectures (2 tests up to 25) points.
Up to 50 points for the final examination. Minimal needed points from final examination is 20.

Course curriculum

1. Introduction to the course. Numeral systems, translation between numeral systems. Binary arithmetic. Negative number representation.
2. Float point representation, IEEE 754-2008 standard, BFloat16. Character encoding: ASCII, ISO-8859-X, Windows-1250, UNICODE.
3. UNICODE encoding forms: UTF-32, UTF-16, UTF-8. Binary data encoding by printable characters (Quoted-Printable Encoding, BASE64).
4. Von Neumann principles a computer conception. Algorithm, program, variable, data type. Programming and markup languages. Programming language types. History, characterization and application of the C language. C language standards.
5. C program structure. Comments. Identifiers. Data types. Constants. Definition and initialization of variables. Constant variables.
6. Expressions and expression statements. Priority, associativity and arity of operators. Arithmetic operators. Assignment operators. Increment and decrement operators. Compound statements. Blocks and variable definitions.
7. The if statement. Relational and logical operators. Logical expressions. The conditional expression. The switch statement. Iteration statements while and do-while.
8. Iteration statement for. Break and continue statements. One dimensional array. Strings.
9. More dimensional fields. Function: definition, declaration, calling, arguments passing, return value. Preprocessing statement #define. Macro with arguments. Inline functions.
10. Preprocessing directives #include, #define, #ifdef, #ifndef, #endif. Header files. Structures. Structures as arguments of function and as function return value. Field of structures.
11. Pointers. Pointers and fields. Pointer arithmetic. Pointers as arguments of functions. Fields as arguments of the function. Structures and pointers.
12. Dynamic memory allocation. Array of the pointers. The command line and arguments of the function main.
13. Files. I/O library functions.

Work placements

Not applicable.

Aims

The aim of the course is to familiar students with basic technique of numbes and characters representation in the computer, binary operations, basics of Von Neumann computer operation, and mainly basics C language programming.

Specification of controlled education, way of implementation and compensation for absences

The computer exercises is mandatory, the properly excused missed computer exercises can be compensate.

Recommended optional programme components

Not applicable.

Prerequisites and corequisites

Not applicable.

Basic literature

HEROUT, P.: Učebnice jazyka C (1. až 2. díl). 6.vyd. České Budějovice: Kopp, 2009. (CS)

Recommended reading

KERNIGHAN, B. W., RITCHIE, D. M.: Programovací jazyk C. Brno: Computer Press, 2006. 286 s. ISBN 80-251-0897-X. (CS)
KADLEC, V.: Učíme se programovat v jazyce C. Computer Press: Praha, 2002. 294 s. ISBN 80-7226-715-9. (CS)

Classification of course in study plans

  • Programme BPC-AMT Bachelor's, 1. year of study, winter semester, compulsory

Type of course unit

 

Lecture

26 hours, optionally

Teacher / Lecturer

Exercise in computer lab

39 hours, compulsory

Teacher / Lecturer