Salta ai contenuti. | Salta alla navigazione

Strumenti personali

PROGRAMMING AND PROGRAMMING LABORATORY

Academic year and teacher
If you can't find the course description that you're looking for in the above list, please see the following instructions >>
Versione italiana
Academic year
2022/2023
Teacher
MARCO ALBERTI
Credits
12
Didactic period
Primo Semestre
SSD
INF/01

Training objectives

The course's goal is to introduce the basics of computer programming using the C programming language.

The main topics are:
- Basic notions regarding problem solving with computers (hardware and software, Von Neumann machine and abstract machines, input and output, algorithm, program, process)
- Procedural programming paradigm (expressions, variables, statements, conditional execution, iteration, structured programming, procedural abstraction)
- Primitive, derivate and abstract data types
- Memory management
- Recursion
- The C programming language

Upon successful completion, the students will the following operational skills:
- Identification of appropriate data structure and algorithms to solve simple problems
- Implementation of algorithms and data structures in C
- Modular programming
- Use of the main tools for computer programming

Prerequisites

None.

Course programme

Introduction (6 hours):
- Course information
- Computer systems
- Introduction to the C language
- Algorithms and programs

Expressions (6 hours):
- Type and value
- Side effects
- Integer arithmetics
- Variable expression
- Assignment
- Floating point arithmetics
- Relational and boolean operators

Flow of control (30 hours):
- Statements
- Default flow
- Conditionals
- Jumps
- Blocks
- Loops
- Functions
- Parameters
- Command line arguments
- Recursion

Data types (15 hours):
- Variables
- Integer types
- Floating point types
- Casting
- Arrays
- Strings
- Structs, Unions
- Enums
- Multi-dimensional arrays
- Pointers

Input and output (9 hours):
- Console Input/Output
- Text files
- Binary files

Memory management (9 hours)
- Dynamic allocation
- Linked lists

Programming tools (15 hours):
- File system and shell
- Editor
- Compiler
- Debugger
- Version control
- C Preprocessor
- Build

Modular programming (3 hours):
- Multi-file programs
- Abstract data types

Professional issues (6 hours):
- Programming process
- Security
- Ethics

Didactic methods

96 hours divided into lectures, with examples, and labs on all the course topics; 21 hours of tutoring, where students can do exercises with the help of a tutor.

Learning assessment procedures

Learning is verified by means of two tests to be taken on the same day:
- a written test composed of questions and simple exercises, to assess the student's grasp of the theoretical notions described in the "Objectives" section (11 points available, threshold 6)
- a lab test, meant to assess the operational skills listed in the "Objectives" section, where the student is required to implement the specified functionality in the C language (22 points available, threshold 12).

If the threshold is met or exceeded in both tests, the exam is passed with grade
- 30 cum laude if the sum of the grades is 32 or 33
- 30 if the sum of the grades is 30 or 31
- the sum of the grades otherwise.

If the sum of the grades is greater or equal than 18, but one of the grades is below the threshold, the student can still pass the exam, with grade equal to the sum of the grades, if they pass an oral/practical examination.

The lab test can be split into two partial tests which will take place around Nov 20 and Jan 20 next year. In this case, the test is passed if the sum of the grades is at least 12 and each individual grade is at least 5. The students who successfully take the partial lab tests can take the written test in any exam session until September next year; if they fail the written test, they need to take the lab test again.

Reference texts

Lecture slides

Manuals of the tools used in the labs

Textbook (especially recommended for students who do not attend the lectures):
- P.Deitel, H.Deitel - Il linguaggio C. Fondamenti e tecniche di programmazione (Ottava edizione) - Pearson (English version: P.Deitel, H.Deitel - C How to Program, 8th Edition - Pearson)

For reference and further reading:
- A.Bellini, A.Guidi - Linguaggio C (quinta edizione) - Mc Graw-Hill
- B.W.Kernighan, D.R.Ritchie - Il linguaggio C. Principi di programmazione e manuale di riferimento - Pearson (English version: B.W.Kernighan, D.R.Ritchie - The C Programming Language, 2nd Edition - Prentice Hall)
- A.Kelley, I.Pohl - C Didattica e Programmazione (seconda edizione) - Pearson (English version: A.Kelley, I.Pohl - A book on C: programming in C, 4th edition - Addison-Wesley Professional)