UC3M

Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2017 - January 2018

Part I.  C Programming

Table of Contents

1. Structure of a C program
1.1. A C program
1.2. Further reading
1.3. Activities
2. C Data Types
2.1. Basic data types
2.2. Structured data types
2.3. Unions
2.4. Enumerations
2.5. Further reading
2.6. Exercises
2.7. Activities
3. Variable declaration
3.1. Scope of a variable
3.2. Defining type aliases with typedef
3.3. Further reading
3.4. Exercises
3.5. Activities
4. Functions in C
4.1. Function definition
4.2. Passing parameters to a function
4.3. Function prototypes
4.4. Static functions
4.5. Automatic self-assessment
4.6. Further reading
4.7. Exercises
4.8. Activities
5. Pointers in C
5.1. Every data has an address in memory
5.2. The indirection
5.3. The pointer to data type
5.4. Assigning an address to a pointer
5.5. Indirections through pointers
5.6. Pointers to pointers
5.7. Indirection use
5.8. Pointers to functions
5.9. Further reading
5.10. Automatic self-assessment
5.11. Pointer Exercises
5.12. Activities
6. System call for memory management in C
6.1. The different memory types in a C program
6.2. The stack and the local variables
6.3. Dynamic memory and the Heap
6.4. The sizeof() function
6.5. Calling the memory management functions
6.6. Arrays and Pointers
6.7. Further reading
6.8. Automatic self-assessment
6.9. 20 problems about dynamic memory
6.10. Anomalies with memory management in C
6.11. Problems about memory leaks
6.12. Activities
7. Hash Tables
7.1. Use context of a hash table
7.2. Possible Implementations
7.3. Hash Tables
7.4. Handling Collisions with Linked Lists
7.5. The hash function
7.6. Table Size
7.7. Further reading
7.8. Self-assessment questions
7.9. Activities
8. Input and output functions
8.1. Introduction
8.2. I/O functions character by character
8.3. I/O functions for data types
8.4. Input functions to read strings in a secure way
8.5. Further reading
8.6. Self-assessment questions
8.7. Activities
9. Reading and writing with files
9.1. Introduction
9.2. The basics
9.3. Reading and writing disk files
9.4. Random access to disk files
9.5. Direct file manipulation
9.6. Self-assessment questions
9.7. Further reading
9.8. Activities
10. Data structure modeling
10.1. About data modeling
10.2. Reference application
10.3. Data modeling in an application
10.4. Establihshing the relationships among different tables in the application
10.5. Information persistency
10.6. Storage of the processed information
10.7. Implementation of data tables in C
10.8. Data storage in files
10.9. Independence of the data model and reuse
10.10. Further reading
10.11. Activities
11. Threads
11.1. Concurrent programming
11.2. Threads
11.3. Mutex
11.4. Further reading
11.5. Activities