Title:

The C Programming Language

Code:CPP
Ac.Year:ukončen 2005/2006
Term:Winter
Curriculums:
ProgrammeBranchYearDuty
EI-BC-3VTB2nd Stage/2nd YearElective
EI-MSC-3VTN3rdElective
EI-MSC-5VTI2nd Stage/3rd YearElective
Language:Czech
Credits:5
Completion:examination (written)
Type of
instruction:
Hour/semLecturesSem. ExercisesLab. exercisesComp. exercisesOther
Hours:3900013
 ExaminationTestsExercisesLaboratoriesOther
Points:7000030
Guarantee:Peringer Petr, Dr. Ing., DITS
Lecturer:Peringer Petr, Dr. Ing., DITS
Instructor:Grulich Lukáš, Ing., DITS
Faculty:Faculty of Information Technology BUT
Department:Department of Intelligent Systems FIT BUT
Follow-ups:
Principles of Compiler Design (ZAP), DIFS
 
Learning objectives:
  The goal is to introduce students to ISO C programming language and programming techniques in C.
Description:
  The C programming language as defined by ISO. The definition of C language. Statements, expressions, functions, parameters. Arrays, structures, unions, enumerations. Pointers, address arithmetic. String operations. Dynamic memory allocation. C preprocessor. Modularity, linking. Creation and use of libraries. C standard library. Development environments, program checking tools. Basic overview of C++, using the C++ standard library. Debugging and testing. Program optimization. Basic rules for creating portable programs.
Knowledge and skills required for the course:
  Basic knowledge of programming concepts.
Learning outcomes and competences:
  Basic knowledge of C programming language, including pointers, address arithmetic, and dynamic memory allocation/deallocation. Modular programming in C.
Syllabus of lectures:
 
  1. Introduction. Overview of C language (K&R, ANSI C, ISO C90, ISO C99). Basic language constructs, examples of C programs.
  2. Definition of C language: lexical elements, declaration syntax, basic types, variables.
  3. Arrays, address space, address, pointer. Pointers and arrays, address arithmetic. Alignment, little/big endian. Dynamic memory allocation.
  4. C-strings, multi-dimensional arrays, structures, unions.
  5. Enumerations. Expressions, operators, type casting, operator precedence. Statements.
  6. Functions, argument passing. Pointers to functions. Command line arguments. The C preprocessor: macros, conditional compilation.
  7. Program structure, compilation units. Linking. Program "make".
  8. The C standard library. Debugging support, character classification, internationalization. Input/output, files.
  9. The examples of standard library use. String and memory management. Time functions. Math library, complex library.
  10. The creation of libraries. Development environments. Program checking tools. Programm documentation tools.
  11. C++ basics, typical differences of C and C++. New operators of C++, overloading basics, namespaces.
  12. Input/output in C++, streams. Basic use of C++ standard library (containers, iterators, algorithms, strings).
  13. Linking of code written in various languages. Profiling and program optimization. Rules for writing portable code.
Syllabus - others, projects and individual work of students:
 2 assignments, each with 2 programs in C
Fundamental literature:
 
  • Kernighan, B., Ritchie, D.: The C Programming Language, 2nd edition, Addison-Wesley, 1989, ISBN 0-13-110362-8
  • Harbison S., Steele G.: C: A Reference Manual, Fifth Edition, Prentice Hall, 2002, ISBN 0-13-089592-X
  • Stroustrup, B.: The C++ programming language, third edition, Addison-Wesley, 1997, ISBN: 0201889544
  • Eckel, B.: Thinking in C++, Volume 1: Introduction to Standard C++, 2nd edition, Prentice-Hall, 2000, ISBN:0139798099
Study literature:
 
  • Harbison S., Steele G.: C: A Reference Manual, Fifth Edition, Prentice Hall, 2002, ISBN 0-13-089592-X
  • Eckel, B.: Thinking in C++, Volume 1: Introduction to Standard C++, 2nd edition, Prentice-Hall, 2000, ISBN:0139798099, [available on WWW]
  • Texts available on WWW
Progress assessment:
  assignments