COMPUTER SCIENCE AND PROGRAMMING LABORATORY
cod. 1007069

Academic year 2023/24
1° year of course - First semester
Professor
Massimo BERTOZZI
Academic discipline
Sistemi di elaborazione delle informazioni (ING-INF/05)
Field
Ingegneria informatica
Type of training activity
Characterising
72 hours
of face-to-face activities
9 credits
hub: PARMA
course unit
in ITALIAN

Learning objectives

The objective of the course is to provide the student with the ability to understand the principles of computer science and programming using C as the reference language and in particular:
* Data representation
* Algorithm concept
* Basic architecture of processing systems
* Procedural programming paradigm
* Introduction to software engineering

The skills to apply the knowledge listed concern the development of the so-called "computational thinking":
* Decomposition of complex problems
* Top-Down problem solving
* Syntax and semantics of the C language

Prerequisites

No propaedeutics. However, it is assumed that the student knows the basics of using computers and the Internet - the equivalent of modules 1, 2, 3 and 7 of the ECDL (European Computer Driving Licence) syllabus.

Course unit content

1. Introduction to programming
2. algorithms
3. basic computer architectures
4. programming languages
5. representation of numbers in computer science
6. C proframming language
7. expressions in C
8. flow control
9. Data types in C
10. Arrays
11. Dynamic memory allocation and pointers
12. C strings
13. functions
14. I/O in C
15. composite data
16. function pointers

Full programme

1. Introduction to programming

2 algorithms
- algorithm concept
- meaning of program
- approach to problem solving
- pseudocode and flowcharts
- top-down and bottom-up approaches


3 basic computer architecture
- history and evolution of computing architectures
- main elements of a CPU
- von Neumann architecture

4 programming languages
- language level
- machine and assembly languages
- high level languages
- interpretation and compilation

5 representation of numbers in computer science
- the memory
- representation systems
- binary format and conversions
- hexadecimal format
- the sign in numbers, complement to 1 and 2
- fixed and floating point numbers

6 the C programming language
- why the C?
- the standard
- compilation phases
- introduction to the basic elements of the language

7. expressions in C
- Operators & Operands
- Typologies
- Expressions
- Assessment
- Precedence & Associativity
- Side effects

8. flow control
- Jacopini Böhm Theorem
- Sequence
- Selection
-if()
- switch()-case
- Iterations
- while()
- do-while()
-for(;;)

9 Data types in C
- Variable definition
- Data types in C
- Scalar data
- Floating point
- Whole
- Combination of different types of data
- Conversions
- Field of visibility of the variables

10 Arrays
- One-dimensional arrays
- Definition
- I use
- Initialization
- Errors
- Multidimensional arrays

11 Dynamic memory allocation and pointers
- Array limit
- Variable Length Array
- Pointers
- The void type
- Memory management functions
- Common mistakes

12 strings in C
- String definition
- Memorization
- I
- The string.h library
- Main operations
- String arrays

13 functions
- Modularity
- The default functions
- The C standard library
- Define a function
- Return type
- Formal Parameters
- Data transfer
- The prototypes
- Recursion

14 I/O in C
- the streams
- file concept
- main operations
- definition
- associate a stream
- read/write and other operations
- closure
- textual and binary files
- Console I/O

15 composite data
- composite data motivation
- the struct construct
- definition
- use
- access items
- padding
- mention of union and enum

16 function pointers
- address of a function
- definition and use of function pointers
- callbacks and examples
- qsort()
- bsearch()

Bibliography

K.N. King, C Programming: A Modern Approach (2nd Edition), W W Norton & Co
Bellini Guidi, Linguaggio C, Mc Graw Hill
B.W. Kernighan e D. Ritchie, The C Programming Language: ANSI C Version, Pearson College
Darnell Margolis, C manuale di programmazione, Mc Graw Hill

Teaching methods

Classroom lessons, with the help of slides made available to students in advance. Guided solution of classroom exercises. Programming exercises in the laboratory.

Laboratory exercises are the most critical part of the course. The proposed exercises are relayed to the same general topics as the classroom lessons. The idea is to introduce the principles of programming, guiding the student to the solution of problems with an increasing level of complexity.

Assessment methods and criteria

Programming test, using C, in two hours in the laboratory

Other information

- - -

2030 agenda goals for sustainable development

- - -

Contacts

Toll-free number

800 904 084

Student registry office

E. segreteria.ingarc@unipr.it

Quality assurance office

Education manager:
Elena Roncai
T. +39 0521 903663
Office E. dia.didattica@unipr.it
Manager E. elena.roncai@unipr.it

 

President of the degree course

Gianluigi Ferrari
E. gianluigi.ferrari@unipr.it

Faculty advisor

Giovanna Sozzi
E. giovanna.sozzi@unipr.it

Career guidance delegate

Guido Matrella
E. guido.matrella@unipr.it

Tutor professor

Boni Andrea
E. andrea.boni@unipr.it
Caselli Stefano
E. stefano.caselli@unipr.it
Cucinotta Annamaria
E. annamaria.cucinotta@unipr.it
Nicola Delmonte
E. nicola.delmonte@unipr.it
Mucci Domenico
E. domenico.mucci@unipr.it
Saracco Alberto
E. alberto.saracco@unipr.it
Ugolini Alessandro
E. alessandro.ugolini@unipr.it
Vannucci Armando
E. armando.vannucci@unipr.it

Erasmus delegates

Paolo Cova
E. paolo.cova@unipr.it
Corrado Guarino
E. corrado.guarinolobianco@unipr.it
Walter Belardi
E. walter.belardi@unipr.it

Quality assurance manager

Massimo Bertozzi
E. massimo.bertozzi@unipr.it

Tutor students

SPAGGIARI Davide E. davide.spaggiari@unipr.it
MUSETTI Alex E. alex.musetti@unipr.it
BERNUZZI Vittorio E. vittorio.bernuzzi1@studenti.unipr.it
NKEMBI Armel Asongu E. armelasongu.nkembi@unipr.it
BASSANI Marco E. marco.bassani@unipr.it
ZANIBONI Thomas E. thomas.zaniboni@unipr.it
BOCCACCINI Riccardo E. riccardo.boccaccini@unipr.it
MORINI Marco E. marco.morini@unipr.it
SHOZIB Md Sazzadul Islam E. mdsazzadulislam.shozib@studenti.unipr.it