Base Knowledge
None in particular.
Teaching Methodologies
In the theoretical classes, the theoretical bases of the C language are explained using simple examples, whenever necessary.
In practical classes, problems are presented that students must implement using the C language.
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
- Analysis and problem solving strategies.
- Introduction to pseudocode.
- Flowcharts.
- Structure of a C program.
- Preprocessor commands (#include and #define).
- Main function.
- Helper functions (prototypes).
- Comments.
- Variables and data types.
- Assignment command and arithmetic operators.
- Memory layout of a C program and introduction to pointers.
- Simple data input and output (getc, scanf, putchar, and printf).
- Decision making (if/else, if/else if/else, and switch/case).
- Boolean expressions.
- Relational operators (==, !=, >, >=, <, <=).
- Logical operators (!, &&, &, ||, and |).
- Repetition mechanisms.
- for loop.
- while loop.
- do … while loop.
- continue and break statements.
- Functions.
- Structure of functions.
- Input parameters.
- Passing parameters by value and by reference.
- Output parameters.
- Local and global variables, and the scope variables.
- Arrays.
- One-dimensional, two-dimensional and multidimensional arrays.
- Strings and functions for string manipulation.
- Passing arrays to functions.
- Pointers and dynamic memory allocation.
- Data structures.
- Data type defining (typedef).
- Data structures as members of other data structures.
- Passing structures to functions (by value and by reference).
- Files.
- Text files and functions for its manipulation.
- Binaries and functions for their manipulation.
Curricular Unit Teachers
Internship(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.