Scientific Disciplinary Sector (SSD)
INF/01 - INFORMATICS
The teaching is organized as follows:
Primo semestre, Secondo semestre
The course aims to provide the basic knowledge for writing programs in an imperative procedural language (e.g., C Language), with emphasis on the relationship between the program and the architecture of the computer running the program, on the concept of recursion and on the implementation of data structures. At the end of the course the students will have to demonstrate that they are able to translate an algorithm into a program written with an imperative procedural language by organizing the related data structures and to be able to optimize it through debugging and profiling techniques. The students must also demonstrate that they have the necessary skills to continue their studies independently in the field of programming and software development.
• Fundamental concepts: programming, high-level languages, operating systems, program compiling.
• Compiling and execution of the first program: first program compiling, first program execution, first program description, variable visualization, comments.
• Variables, data types and arithmetic expressions: operating with variables, data types and constants, operating with arithmetic expressions, combining operations with assignment – assignment operators.
• Iteration: for instruction, while instruction, do instruction.
• Taking decisions: if instruction, switch instruction, Boolean variables, conditional statement.
• Statements with arrays: array definition, array initialization, arrays of chars, multidimensional arrays.
• Functions: function definition, arguments and local variables, returning results of a function, functions that call functions that calling functions…, top-down programming, functions and arrays, global variables, automatic and static variables, recursive functions.
• Structures: a structure for data storing, functions and structures, structure initialization, array of structures, structures containing structures, structures containing arrays, variants of structures.
• Strings of chars: arrays of chars, strings of chars of variable length, escape sequences, other information of constant strings, char strings, structures and arrays, operations with chars.
• Pointers: pointer definition, using pointers in expressions, pointers and structures, pointers and functions, pointers and arrays, operations on pointers, pointers and memory addresses.
• The preprocessing: #define directive, #include directive, conditional compiling.
• Input/Output operations: I/O of chars – getchar and putchar, printf and scanf
• Advanced characteristics: comma operator, dynamic memory allocation.
• Introduction, file system, bash, editor.
• Practical programming in lab by applying all the arguments explained in the theory part: examples, exercises.
• Code debugging: gdb, ddd, and CodeBlocks.
Visualizza la bibliografia con Leganto, strumento che il Sistema Bibliotecario mette a disposizione per recuperare i testi in programma d'esame in modo semplice e innovativo.
The exam, unified with the Laboratory module, consists in two parts, that will take place around February (first part) and June (second part). The exam will be passed if both parts are sufficient. The final global mark will be the composition (average) of the marks of the two parts. Students who do not pass these partial exams can try again in the normal 4 examinations scattered around the year, starting from June. Those exams are on the total program of the course.
The exams (partial as well as total) verify the ability in coding simple programs to the computer or a written exam.
To pass the exam, the students have to show:
- they have understood the principles related to the programming in C language
- they are able to develop C code and to analyze its correctness and problems through debugging
- they are able to apply the acquired knowledge to implement algorithms in C code by starting from specifications given as exercises.
The emphasis in the evaluation will be given to the ability to organize algorithms and data structures and to translate them into the C language.