Course Details

PROGRAMMING 1

MF0207

Course
PROGRAMMING 1
Code
MF0207
Academic Year
2025/2026
Curriculum Year
2025/2026
Degree Programme
CHEMICAL SCIENCES
Curriculum
000 - CORSO GENERICO
Course coordinator
Credits
9
Lecture Hours
72
Scientific Disciplinary Sector (SSD)
INF/01 - Computer Science
Course Type
Single-subject learning activity
Course Delivery
OBB - Obbligatoria
Year
1
Teaching period
Primo Semestre
Campus
VERCELLI
Teaching language
Italian
Course Contents
The course has the goal of introducing the fundamentals of computer programming, starting from the concept of algorithm and the basic concepts of a program, and arriving to advanced concepts of data structures and control in the programming language. Moreover the course presents the basic concepts of the C programming language used to support the teaching of programming, and to perform practical exercises in the laboratory.
Reference Texts
- Kelley, Pohl, “A book on C: programming in C”, Pearson, 4th edition, 1997, https://www.informit.com/store/book-on-c-programming-in-c-9780201183993 - P. Deitel, H. Deitel, “C: How to program”, Pearson, 9th edition, 2022, https://www.pearson.com/en-us/subject-catalog/p/c-how-to-program/P200000003460/9780137398393 - Kernighan, Ritchie, “The C Programming Language”, Pearson, 2nd edition, 1988, https://www.pearson.com/en-us/subject-catalog/p/c-programming-language/P200000000368/9780131103627
Learning Outcomes
The student must know the basic programming constructs, the basic data structures (variables, constants, arrays), and the organization of a program into functions.

Given a problem of average complexity, the student must be able to deduce the possible input data, the possible output data, and the algorithm solving the problem. Moreover the student must be able to write a programme in C language, corresponding to the algorithm, compile it, and execute it.
Prerequisites
None
Teaching Methods
The course consists of frontal lectures and laboratory lectures.
Frontal lectures take 48 hours.
laboratory lectures take 24 hours.

Modality:
during the frontal lectures the theoretical aspects about programming (algorithms, constructs, data structure, etc) are presented.
Moreover, by means of a computer connected to a projector, the way to implement such aspects on a computer, is shown.
For each topic, several examples of problems are presented, together with the corresponding algorithms and programs.
During the laboratory lectures, the students are asked to implement the same programs presented in the frontal lectures, and to implement other programs solving similar problems.

Tools:
in order to gradually learn the concepts of algorithm, program, and their constructs, at the begin of the course, the algorithms are defined through several abstraction levels: flow-chart, pseudo-code, programming language.
Since it is a course on basic programming, the programs are written on the computer by means of an ordinary text editor. In order to make the students familiar with the terminal (useful for the following courses), program compiling and execution is performed through the command line of the terminal. Besides the compiling and execution commands, the main terminal commands are presented and applied.
During the course, learning is verified through a series of exercises for each topic of the course.
Each exercise requires to define an algorithm and write the corresponding program in C language.
During the laboratory lectures, each exercise is introduced, the general program structure is defined, and the students are asked to complete the program in an autonomous way, within a certain amount of time. Then, the solution of the exercise is provided in order to verify the correctness.
At the end of the course, several exam simulation are performed, on the computer, to allow the students to be aware of what is actually required at the exam.
Besides the laboratory lectures, tutoring lectures are available for the students, in order to continue the exercises, clarify doubts, and require to explain a topic for the second time.
The course has its own page in the platform DIR (Didattica in Rete), which contains the slides, the programs shown during the frontal lectures, the programs prepared during the laboratory and tutoring lectures, the exams of the past, etc.
Additional Information
No partial exams will take place during the course. Students with disabilities or Specific Learning Disorders (DSA) or Special Educational Needs (BES) can request specific services and tools dedicated to them by contacting the Career Development and Coordination and Student Services Staff and by consulting the dedicated page on the University website: https://uniupo.it/it/servizi/servizi-studenti-disabili-e-dsa Students with disabilities, DSA, BES can also contact the professor in charge of the course in relation to the declination of the exam methods.
Assessment Methods
The exam consists of two tests held on the same day: 1) quiz; 2) practical test.

1.
The quiz contains 30 multiple-choice questions covering basic C programming concepts.
For each question, there are four possible predefined answers: 1 is correct, 3 are incorrect. The student must select the answer that she/he believes to be correct.
Each question is worth 1 point.
The quiz is failed if the student selects fewer than 18 correct answers. In this case, the exam ends immediately with a failing grade.
The quiz is passed if the student selects at least 18 correct answers. In this case, the student proceeds to the practical test.
Students can find a sample quiz, along with the solution, on the DIR platform.
The quiz lasts 40 minutes and can cover any course topic.

2.
During the practical test, the student, given a specific problem, must: a) implement a C program containing the data structures and algorithms needed to solve the problem; b) successfully compile the program; c) verify the program's correct execution.
The program must be structured into 5 functions, including the main function. Each function is worth 6 points.
If the program cannot be compiled (is not formally correct), the exam is directly given a failing grade.
If the program can be compiled (is formally correct), each function is scored from 0 to 6 points based on its level of logical correctness.
The practical test is failed if the overall score is less than 18. The practical test is passed if the overall score is at least 18.
The practical exam lasts 2 hours and can cover any course topic.
Students can find past practical tests, with solutions, on the DIR platform.

The exam is passed only if both tests are passed. In this case, the final grade is the weighted average of the quiz score (1/3) and the practical test score (2/3).

During both tests, consultation of course materials or manuals is not permitted.
Both tests use lab computers; the use of mobile devices or laptops is forbidden.
Detailed Syllabus
- introduction to programming and C language;
- algorithms and their representation;
- variables, constants, data types, arithmetic operators;
- input/output operators in C;
- first programs in C, with the only use of command sequences;
- selection (if...else) with simple and composed Boolean conditions;
- loops (while, for, do-while);
- arrays;
- functions with arguments by value;
- pointers and function arguments by reference;
- pointer arithmetic;
- arguments from command line;
- input/output to file;
- use of terminal.
Expected Learning Outcomes
At the end of the course, given a simple programming problem, the student must be able to define the algorithm solving the problem, implement the algorithm in C language, execute the program on the computer, and verify its correctness.

Knowledge and comprehension:
concepts of algorithm and program, fundamental data structures, basic programming constructs.

Capacity to apply knowledge and comprehension:
given a problem,
- identifying input data to be collected from the user, and output data to be produced;
- identifying the data structures necessary to manage such data;
- defining an algorithm transforming input data in output data, by following the programming constructs;
- writing on the computer the source program implementing the algorithm, using the programming language (C);
- generating the executable program by compiling the source program, on the computer;
- executing and testing the executable program, on the computer.

Judgement autonomy:
in an autonomous way the student must be able to identify the necessary data structures, define and implement the algorithm in the programming language (C), and finally compile and execute the program.

Communication abilities:
the student must be able to define an algorithm at several abstraction levels, such as the flow-chart, the pseudo-code, the program in the programming language. Moreover the program must require and present data to the user by means of message that the user can understand.

Learning capacity:
the student must be able to learn how to generate an algorithm from the problem, how to implement an algorithm in a programming language, and finally how to compile and execute a program on a computer.
Last update:09-09-2026 00:14:31