Course detail

Computers and Programming 2

FEKT-CPC2Acad. year: 2013/2014

Students become familiar with algorithm development and programming in ANSI C up to building up own libraries and their applications. During computer practices, students will build up simple console applications in C language.

Language of instruction

English

Number of ECTS credits

5

Mode of study

Not applicable.

Offered to foreign students

Of all faculties

Learning outcomes of the course unit

The graduate is able (1) to build up a simple console application in ANSI C and (2) to build up an own library of functions in ANSI C.

Prerequisites

The subject knowledge on the secondary school education level is requested.

Co-requisites

An extension of the knowledge on algorithm development and solution of linear equations is considered.

Planned learning activities and teaching methods

Teaching methods depend on the type of course unit as specified in the article 7 of BUT Rules for Studies and Examinations.

Assesment methods and criteria linked to learning outcomes

Students can obtain 40 points for the activity in computer practices, 30 points for the final test, and 30 points (maximally) for an individual project in C.

Course curriculum

1. Software development, operation code, instructions, assembler, high level programming languages, compilation, linking program. Program structure, algorithm, algorithmic flowchart, variables, data types, numerical formats and their representation in memory, arithmetic and logic operations. Application development using IDE Code::Blocks.
2. Introduction to C language, basic structure of C program, function main(), variables, arrays, expressions, arithmetic conversions, operators in C language, priority of operators, inputs, outputs.
3. Simple console application in Code::Blocks.
4. Statements in C language, branching statements - if, else, switch, case; loop statements - for, while, do-while; statements for program progress - break and continue.
5. Strings in C, library functions for programming with strings "stdio.h" and "string.h". String copying, searching in string, comparing of strings.
6. Pointers and arrays. Relationship of arrays and pointers. Arrays storage in memory. Indexes of array elements.
7. Functions in C language. Headers of functions with parameter, without parameter, parameters calling by value and by reference. Calling of the function, returning value. Recursive function.
8. Building up of own library, linking its to application.
9. Advanced data types. Structures, unions, enumerative types.
10. Dynamic variables, allocation and deallocation in memory.
11. Programming with files in C. Library functions for programming with files, reading, writing. Text file processing.
12. Dynamic variables linking. Linear lists, trees. Example for dynamic database.
13. Advanced algorithms. Algorithms for maximum and minimum searching, sorting – selectsort, insertsort, bublesort

Work placements

Not applicable.

Aims

The course is aimed to learn students basic task of algorithmic thinking and algorithm programming using C programming language in standard ANSI C up to level, in which students are able to build up own libraries with own functions and to use them, to read from and write to files, to use structures and dynamic variables.

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

The content and forms of instruction in the evaluated course are specified by a regulation issued by the lecturer responsible for the course and updated for every academic year.

Recommended optional programme components

Not applicable.

Prerequisites and corequisites

Not applicable.

Basic literature

PRINZ, P., KIRCH-PRINZ, U. A Complete Guide to Programming in C+. Sudbury: Jones and Bartlett Computer Science, 2002
DALE, N., WEEMS, CH. Programming in C+. Sudbury: Jones and Bartlett Computer Science, 2005

Recommended reading

Not applicable.

Classification of course in study plans

  • Programme EEKR-BC Bachelor's

    branch BC-AMT , 1. year of study, summer semester, compulsory
    branch BC-EST , 1. year of study, summer semester, compulsory
    branch BC-MET , 1. year of study, summer semester, compulsory
    branch BC-SEE , 1. year of study, summer semester, compulsory
    branch BC-TLI , 1. year of study, summer semester, compulsory

Type of course unit

 

Lecture

26 hours, optionally

Teacher / Lecturer

Syllabus

1. Algorithmization (extensions of basic knowledge from the previous semester). Definition of the task, the definition of inputs / outputs, expressing
an algorithm in meta-language, rewritting into programming language.
2. Introduction to C language. Basic types of variables, derived types, constants, arrays.
3. Expressions, arithmetic conversions, arithmetic operators, shift operators, relation operators, logical operators, bitwise operators, assignment
operators, operator priority.
4. Strings and their operators, library functions, standard library string.h.
5. Commands, compound statements, branching commands, cycles and control commands. Flowchart.
6. Function. Declaration of functions, methods of function calling, treatment events, recursion of functions.
7. Advanced data types. Union, enum, dynamic variable, pointer.
8. Objects. Lexical elements, constants and strings, classes, objects, object types.
9. User interface of Microsoft Visual C++ Studio. Graphical components.
10. Algorithms I. Finding maxima and minima, sorting.
11. Algorithms II. Programming with arrays, matrices operations.
12. Algorithms III. Programming with files in Windows.
13. Algorithms IV. Database systems. Records, sorting, searching, statistics. Linking of databases.

Exercise in computer lab

26 hours, compulsory

Teacher / Lecturer

Syllabus

1. Algorithmization (extensions of basic knowledge from the previous semester). Definition of the task, the definition of inputs / outputs, expressing
an algorithm in meta-language, rewritting into programming language.
2. Introduction to C language. Basic types of variables, derived types, constants, arrays.
3. Expressions, arithmetic conversions, arithmetic operators, shift operators, relation operators, logical operators, bitwise operators, assignment
operators, operator priority.
4. Strings and their operators, library functions, standard library string.h.
5. Commands, compound statements, branching commands, cycles and control commands. Flowchart.
6. Function. Declaration of functions, methods of function calling, treatment events, recursion of functions.
7. Advanced data types. Union, enum, dynamic variable, pointer.
8. Objects. Lexical elements, constants and strings, classes, objects, object types.
9. User interface of Microsoft Visual C++ Studio. Graphical components.
10. Algorithms I. Finding maxima and minima, sorting.
11. Algorithms II. Programming with arrays, matrices operations.
12. Algorithms III. Programming with files in Windows.
13. Algorithms IV. Database systems. Records, sorting, searching, statistics. Linking of databases.