Versão em Português
Course Description
OBJECTIVES
Introduce the fundamental concepts of imperative programming, emphasizing structured programming, using the C programming language as a basis. Emphasis will be placed on practical problem-solving, basic algorithms for counting, searching, and sorting, and on code quality.
Learning outcomes and competences
Upon completing this curricular unit, students should be able to:
- Use the syntax and semantics of fundamental constituents of the C language.
- Write, test, and execute programs to solve simple problems based on an informal specification.
- Implement some basic algorithms in C.
- Understand the concept of pointers and use them for processing indexed variables and character strings.
- Use dynamic memory allocation.
- Utilize standard C library functions for string processing and file reading/writing.
- Apply structured programming techniques.
- Use basic data structures (linked lists, trees).
Syllabus
- Introduction to the C programming language. Brief historical context. Caracteristics of the language. Strengths and weaknesses of C. Pitfalls and general guidelines in effective use of the language.
- Fundamentals of the C language. Basic syntatic structure: directives, declarations, expressions. Compilation and execution.
- Basic types (integers, floating point numbers and characters). Flow of control. Cycles. Definition functions. Fomated I/O.
- Elementary numerical and semi-numerical algorithms.
- Indexed variables. Fundamental algorithms: counting, searching, and sorting. Processing character strings.
- Program organization: header files, standard libraries.
- Error detection and prevention. Use of a "debugger" and assertions.
- Introduction to programming with pointers. Using pointers to process strings and indexed variables.
- Recursion. Algorithmic problem solving: iterative and recursive approaches.
- Definition of new data types (structs, unions).>
- File input/output.
- Definition and use of some basic data structures (linked lists, trees).
TEACHING METHODS
Lecture classes
Oral presentation supported by slides; interactive resolution of illustrative programming examples and complementary exercises.
Practical classes
olving proposed exercises using computer with standard development tools (text editor, compiler, debugger). Use of automatic assessment tools for programming tests to aid in detecting and correcting errors in solutions of selected exercises.
Use of automatic evaluation tools (Mooshak).
Classes will involve:
- The use of the C programming language.
- Solving exercises designed to practice programming skills.
- Solving exercises intended for assessment purposes.
BIBLIOGRAPHY:
Primary References
Recommended Addictional References
- Cormen, Leiserson, Rivest and Stein, Introduction to
Algorithms, 4th edition, The MIT Press, 2022.
- Robert Sedgewick, Kevin Wayne, Algorithms, 4th edition,
Addison-Wesley, 2011.
Assessment Method:
Student assessment involves the following components (all marked in %,
i.e. 0 to 100 points):
- (E) Written Exam (Regular and Resit Periods):
70% of final mark.
- (P) Practical Problem-Solving (2 Practical Tests):
25% of final mark; each test marked from 0 to 100 points.
Each evaluation is worth of 12.5% of the final mark. Proposed
exercises will be of similar dificulty as the practice exercises
given in classes.
- (R) Ongoing Exercises during the Semester (exercises
from classes #3 till #12): 5% of final mark.
Final grade (scale from 0 to 20): (CF = 0.7*E+0.25*P+0.05*R).
To pass, students must meet the following requirements:
- E ≥ 7 (out of 20),
- CF ≥ 9.5 (out of 20).
In the resit period, the practical component (P and R) cannot be repeated.
ASSESSMENT PROCEDURE:
- Practical tests will be conducted outside regular class hours, with 90-minute sessions.
- The problems will be similar to those from the practical classes.
- Students must attend the assigned session; requests to switch sessions must be made at least 48 hours in advance.
- Failure to attend a test will result in a zero grade.
- Solutions submitted via Mooshak will be graded based on partial scores for different test cases.
ATTENDANCE REQUIREMENT
- Students must attend more than 50% of the classes; otherwise, they will lose their course attendance status.
SPECIAL CASE ASSESSMENT
- Except in cases of force majeure or for students with special status, attendance of the practical component is mandatory, and participation in classes is strongly encouraged.
- Students who passed the course in previous years but wish to improve their grade can take only the written exam, which in these cases will account for 100% of the grade.