Base Knowledge
None in particular.
Teaching Methodologies
In each class, a brief exposition of the necessary theoretical concepts is made, after which programming exercises will be carried out that consist of coding in the language C of problems presented to students.
Learning Results
Objectives: to acquire the ability to develop problem solving strategies and to code these strategies in the C programming language.
Skills to develop:
- Simulate step-by-step execution of simple programs;
- Write programs to solve simple problems (examples: numerical calculation, word processing);
- Break down problems into sub-tasks that can be implemented as reusable functions;
- Test and fix errors in programs.
Program
1. Analysis and problem solving strategies.
2. Introduction to pseudocode.
3. Flowcharts.
4. Structure of a C program.
4.1 Preprocessor commands (#include and #define).
4.2 Main function.
4.3 Helper functions (prototypes).
4.4 Comments.
5. Variables and data types.
6. Assignment command and arithmetic operators.
7. Memory layout of a C program and introduction to pointers.
8. Simple data input and output (getc, scanf, putchar, and printf).
9. Decision making (if/else, if/else if/else, and switch/case).
9.1 Boolean expressions.
9.2 Relational operators (==, !=, >, >=, <, <=).
9.3 Logical operators (!, &&, &, ||, and |).
10. Repetition mechanisms.
10.1 for loop.
10.2 while loop.
10.3 do … while loop.
10.4 continue and break statements.
11. Functions.
11.1 Structure of functions.
11.2 Input parameters.
11.3 Passing parameters by value and by reference.
11.4 Output parameters.
11.5 Local and global variables, and the scope variables.
12. Arrays.
12.1 One-dimensional, two-dimensional and multidimensional arrays.
12.2 Strings and functions for string manipulation.
12.3 Passing arrays to functions.
12.4 Pointers and dynamic memory allocation.
13. Data structures.
13.1 Data type defining (typedef).
13.2 Data structures as members of other data structures.
13.3 Passing structures to functions (by value and by reference).
14. Files.
14.1 Text files and functions for its manipulation.
14.2 Binaries and functions for their manipulation.
Curricular Unit Teachers
Jorge Miguel Tavares Couceiro de SousaInternship(s)
NAO
Bibliography
- Kernighan, B. W. & Ritchie, D. M. (1988). The C programming language (2nd edition). Englewood Cliffs, N. J. : Prentice Hall.
Cotas da biblioteca do ISEC: 1A-1-68 (ISEC) – 05389, 1A-1-222 (ISEC) – 07998. - Damas, L. (). Linguagem C. FCA – Editora de Informática, Lda..
Cotas na biblioteca do ISEC: 1A-1-321 (ISEC) – 10344, 1A-1-365 (ISEC) – 11819, 1A-1-366 (ISEC) – 11820, 1A-1-389 (ISEC) – 12100, 1A-1-200 (ISEC) – 15330, 1A-1-456 (ISEC) – 18949.