Programming C
A.Y. 2023/2024
Learning objectives
The course is aimed at understanding fundamental concepts of programming imperative languages, designing algorithms to solve simple problems and learning the C programming language
Expected learning outcomes
The student will be able to write simple programs using the C programming language
Lesson period: Second semester
Assessment methods: Esame
Assessment result: voto verbalizzato in trentesimi
Single course
This course cannot be attended as a single course. Please check our list of single courses to find the ones available for enrolment.
Course syllabus and organization
Single session
Responsible
Lesson period
Second semester
Course syllabus
- The way to program: CPUs, programming languages, compilers/interpreters, errors and debugging, "Hello world" in C.
- Variables and simple data types: boolean, integer, floating point, string, complex number, pointer.
- Functions: parameters, local variables and scope, return values, recursion, pass-by-value/pass-by-reference, C mathematical functions.
- Conditionals: if and switch. Iteration: for and while. File I/O & formatting. Arrays, dynamic memory allocation, vectors and matrices, numerical algorithms.
- Derived types: struct, union, typedef, classes and objects, templates.
- Standard container types: list, queue, hash, map. Algorithms: sort, find, swap, copy, move, swap, transform, remove, shuffle.
- Advanced topics: multi-threading with OpenMP, modular programming, using external libraries
- Variables and simple data types: boolean, integer, floating point, string, complex number, pointer.
- Functions: parameters, local variables and scope, return values, recursion, pass-by-value/pass-by-reference, C mathematical functions.
- Conditionals: if and switch. Iteration: for and while. File I/O & formatting. Arrays, dynamic memory allocation, vectors and matrices, numerical algorithms.
- Derived types: struct, union, typedef, classes and objects, templates.
- Standard container types: list, queue, hash, map. Algorithms: sort, find, swap, copy, move, swap, transform, remove, shuffle.
- Advanced topics: multi-threading with OpenMP, modular programming, using external libraries
Prerequisites for admission
Nothing
Teaching methods
16 hours lecture, 32 hours computer lab (total 48h). Frequency not mandatory
Teaching Resources
- Allen B. Downey, How to Think Like a Computer Scientist in C++ (Green Tea Press), http://www.greenteapress.com/thinkcpp/index.html
- MIT IAP2010, Practical Programming in C, http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-087-practical-programming-in-c-january-iap-2010/
- MIT IAP2011, Introduction to C++, http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-096-introduction-to-c-january-iap-2011/
- MIT IAP2010, Practical Programming in C, http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-087-practical-programming-in-c-january-iap-2010/
- MIT IAP2011, Introduction to C++, http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-096-introduction-to-c-january-iap-2011/
Assessment methods and Criteria
Written exam (students will be asked to write a C program, with documentation strings in English). The final marks will depend on number of programming errors. Extra credits (i.e. lode) depending on extra features and graphical appearance.
INF/01 - INFORMATICS - University credits: 6
Practicals: 16 hours
Lessons: 40 hours
Lessons: 40 hours
Professor:
Capra Lorenzo
Professor(s)