FONDAMENTI DI PROGRAMMAZIONE A - E
Module PROGRAMMAZIONE II

Academic Year 2025/2026 - Teacher: Vincenza CARCHIOLO

Expected Learning Outcomes

This Programming II module of the Foundations of Programming course focuses on training students to be proficient in advanced programming in ANSI C, and to be capable of designing, evaluating, and implementing algorithms and data structures appropriate for problem solving, as well as communicating using the language of the field. The module also includes a brief introduction to complexity theory and its direct application to algorithms on linear data structures. In addition, problems and solutions on non-linear data structures are presented.



Knowledge and understanding

Students will acquire a solid knowledge and understanding of the fundamental linear and hierarchical data structures, including lists, queues, and binary search trees, as well as the computational complexity of operations on them and the search and sorting algorithms. They will be able to demonstrate a deep understanding of the concepts related to dynamic data structures, including pointers and their management.

  • Knowledge of the syntax and semantics of the ANSI C language

  • Knowledge of significant algorithms and the main data structures

  • Knowledge of the main memory management techniques

Applying knowledge and understanding

Students will be able to apply the knowledge acquired in the design and implementation of practical solutions, using the ANSI C language, using the data structures, algorithms covered in the course, and the tools available. Finally, they will be able to solve complex problems using these knowledge.

The course will promote the development of design skills, allowing students to design efficient and well-structured solutions that meet specific requirements. They will be able to effectively plan and implement the use of dynamic data structures in their projects.

  • Ability to solve problems that use dynamic memory and dynamic data structures (such as lists, queues, and binary trees), write the solution algorithm and implement it using the ANSI C language
  • Ability to analyze the code and correct errors during the development phases and realize a working application
  • Advanced bug-finding (debugging) ability in the context of a development environment (IDE)

Learning skills

This teaching aims to provide students with the ability to effectively exploit the available resources, including the standard ANSI C library functions and integrated development environments with particular emphasis on error-finding tools such as the debugger. Students will learn to understand and manage memory resources (both mass and central) in an appropriate way, especially when using dynamic data structures.

Students will develop skills in the critical analysis of algorithm performance and the evaluation of computational complexity. They will be able to evaluate and compare solutions based on algorithms and data structures based on time and space criteria.

  • The student is able to find the best solution to a problem, taking into account both effectiveness and efficiency, define the algorithm, code it and guarantee its operation
  • Be able to use the knowledge and skills acquired to address complex problems in a methodological way

Communication skills

Students will develop communication skills through the clear and accurate description, using the most appropriate formal tools, of their software solutions and the ability to communicate effectively concepts related to data structures and algorithms with their colleagues and the instructor. They will be able to present their ideas and solutions in a clear and persuasive way.

  • The student acquires the knowledge of the computer language and technical terminology.

Course Structure

The course is primarily taught through lectures to acquire the basic theoretical knowledge and all the syntactic elements, and the performance of exercises, to be carried out also autonomously, proposed by the teacher to acquire the ability to solve problems, apply knowledge and use the development environments and methodologies.

The teacher also proposes individual exercises that consist of the solution of a problem that the student must face independently, which are subsequently corrected or discussed in class.

If the teaching is imparted in mixed or distance mode, the necessary changes may be introduced with respect to what was declared previously, in order to respect the program provided and reported in the syllabus.

Required Prerequisites

Knowledge of the topics covered in the Programming I module

Attendance of Lessons

Attendance is not mandatory, albeit strongly recommended, to successfully pass the exam.

The student is required to attend at least 70% of the lectures of the course to be able to take the mid-term exam of the module.

If the teaching is imparted in mixed or distance mode, the requirements for participation in the mid-term exams may be modified.

Detailed Course Content

THE ANSI C LANGUAGE

Fundamental elements of the C language, including syntax

  • Structure of a C program

  • Data types and representations

  • Variables, constants, and assignment statements

  • Arithmetic, relational, and logical operators

  • Expressions

  • Basic console input/output functions: printf and scanf

  • Control structures: if-else, switch, and iterations (while, do-while, for)

  • C development environments, compilation, execution, and debugging


Structured Types

  • One-dimensional arrays

  • Strings and arrays of strings

  • Multidimensional arrays

  • Pointer variables, operators, and expressions with pointers

  • Pointers and arrays and their equivalence

  • Structures, arrays of structures, pointers to structures, arrays and structures within other structures

  • Other structures: union, bit fields, and enumerations

  • sizeof and typedef


Functions

  • Definition and declaration of functions

  • Function visibility rules

  • Function arguments, including those of main

  • return statement and values returned by a function


Memory Management

  • Memory organization in a program (global, heap, and stack)

  • Heap memory and dynamic allocation of arrays

  • Recursion

  • Declarations and scope of identifiers

  • Parameter binding techniques

  • Side effects and function implementation

  • Use of pointers to functions

  • Function pointers


Input/Output (I/O) Management

  • Reading and writing characters and strings

  • Formatted I/O

  • Text and binary files

  • Reading and writing operations on files


Abstract Data Types: implementation in C

  • Translation of Abstract Data Types into Concrete Data Types (CDT) using ANSI C

  • Writing applications in ANSI C that make use of ADTs and their implementations


Linear Data Structures

  • Lists and ordered lists: singly and doubly linked implementations

  • Queues

  • Stacks

  • Examples of arrays of linear data structures

Non-linear Data Structures

  • Binary trees and binary search trees

  • Definition, implementation, and main algorithms

  • Graphs: definition and traversal algorithms


Computational Complexity

  • O and Ω notations for evaluating the complexity of a program

Course Planning

 SubjectsText References
1Abstract data types (ADTs) and their implementation in CHandout
2Lists and sorted listsHandout
3QueueHandout
4StackHandout
5Bynary tree and bynary search treeHandout
6Brief introduction to complexity theoryHandout
7GraphHandout
8Search and sorting algorithmsHandout

Learning Assessment

Learning Assessment Procedures


Final exam for module 2

The final exam for module 2 consists of:

  • A computer application development task, 120 minutes

  • The test is assigned a maximum score of 23 points

  • An oral exam. Access to the oral exam is conditional on passing the computer application task

Course exam

  • The course exam consists of passing the final exams for module 1 and module 2

  • The final grade is given by the average of the scores obtained in the two tests

  • The exams for both modules can be taken in the same session

No midterm 

Examples of frequently asked questions and / or exercises

Handouts and exercises distributed by the teacher through the Microsoft Teams platform