Base Knowledge
Basic knowledge of programming in C language.
It is recommended that students have passed the Introduction to Programming course.
Teaching Methodologies
Theoretical classes: Presentation of new concepts and discussion of examples.
Practical classes: Resolution of practical exercises. Autonomous implementation of C programs.
Learning Results
In this course the students learn how to implement complete programs in C. All main features of C are examined in order to give the students a comprehensive knowledge of this programming language. This knowledge is essential to develop programs that are able to solve real-world problems.
The most important topics discussed in this course are file manipulation and dynamic memory management. The students also learn how to develop programs that operate on fundamental data structures, such as queues, heaps, linked lists and binary trees.
Program
1. Pointers
1.1. Introduction. Pointers and addresses
1.2. Pointers and functions
1.3. Pointer arithmetic
1.4. Pointer arrays to strings
2. Header files
2.1. Dividing the source code into multiple files
2.2. Using header files
3. Structures
3.1. Definition
3.2. Typedef
3.3. Arrays of structures
3.4. Dynamic allocation of an array
3.5. Unions
3.6. Enumerations
4. Dynamic structures
4.1. Dynamic storage allocation
4.2. Linked lists
4.3. Other dynamic structures
5. Files
5.1. Text files and binary files
5.2. Basic operations: creation, reading and writing
5.3. Other operations: search, modification
5.3. Non-sequential access to files
6. Recursive functions
6.1. Definition
6.2. Writing recursive functions
6.3. Binary trees
Curricular Unit Teachers
Internship(s)
NAO
Bibliography
Mandatory
King, K. N. (2008). C Programming: A Modern Approach, second edition, W. W. Norton & Company. (Cotas 1A-1-351, 1A-1-352)
Slides of the theoretical classes and support material for the practical classes (Worksheets and code snippets). The material is available at InforEstudante and GitHub.
Complementary
Bermudez, M. (1998). Study Guide for C Programming: A Modern Approach, W. W. Norton & Company. (Cotas 1A-1-293, 1A-1-91)
Guerreiro, P. (2006). Elementos de Programação em C, 3ª edição, FCA- Editora de Informática. (Cotas 1A-1-195, 1A-1-430)
Sedgewick, R. (1999). Algorithms in C: Fundamentals, Data Structures, Sorting, Searching, 3ª edição, Addison-Wesley. (Cota 1A-1-296)