Travaux pratiques (TP) - Programmation

83 documents à télécharger gratuitement

Travaux pratiques (TP) de programmation, partagés par des étudiants et des enseignants. Thèmes couverts : algorithmique, langage C, Java, Python, POO, structures de données.

TP4 : Les listes - Atelier programmation 2

The document serves as a support guide for a practical programming workshop on linked lists. It introduces the basic operations on linked lists, including creation, insertion (at head, tail, or specific position), deletion, and search operations using C programming language. It provides structural definitions for list nodes, memory allocation techniques with `malloc`, and examples of implementation such as functions for list display and element addition/removal. The guide also includes interactive programming exercises for building and manipulating linked lists, emphasizing user interactivi...

linked list
malloc
data structures
3p0
Support de Travaux Pratiques « Atelier Programmation 2 » - TP4 : Les Listes

This document focuses on implementing and manipulating linked lists in C. It details the creation of data structures, memory management using malloc, and functions for adding, removing, and searching elements in lists. Practical exercises involve writing C code for interactive list manipulation and defining procedures such as adding elements at the head or tail. The document emphasizes understanding memory allocation and pointer usage within the context of linked lists.

linked list
malloc
memory allocation
3p0
Atelier Programmation 2 - TP4 : Les listes

This document serves as a practical guide for manipulating linked lists in C. It covers the creation and management of linked list data structures, including defining nodes, memory allocation, and pointers. It provides procedures and functions for insertion (head, end, specified position), deletion, and searching of elements. Furthermore, it offers interactive examples to build and display linked lists based on user input.

linked list
C programming
data structures
3p0
Lists: Implementation and Manipulation in C

This document explains and demonstrates linked lists in detail, contrasting them with arrays to establish their dynamic nature and operational flexibility. It elaborates on the creation, declaration, and core operations of linked lists in C, including addition, deletion, searching, and traversal. The document highlights the versatility of linked lists by demonstrating various examples of their implementation, such as dynamically adding elements and calculating properties like length and occurrences. Methodologies are accompanied by detailed examples and C code to illustrate practical applic...

linked list
realloc
C programming
9p0
TP n°: 4-5 - Assembly Language Programming Basics and Exercises

This document comprehensively outlines the foundational structure of assembly language programs by dividing them into key segments: data, stack, and code. It explains essential declarations, variable initialization, and the use of pseudo-instructions, such as DB, DW, and DD, to define memory usage. Detailed instructions for stack and procedure usage are provided, along with examples demonstrating input/output operations via DOS interrupt functions. Exercises cover memory storage, displaying characters, keyboard input handling, and various table manipulations via assembly code.

Assembly Language
SEGMENT
PROC/ENDP
12p0
Les Structures en Langage C: Déclaration, Manipulation et Applications

This document explains the concept of structures in the C programming language, contrasting them with arrays and describing their syntax and usage. It provides methods to define, initialize, and utilize structures, including best practices and examples. Applications explore creating and managing data for planets, with functions to handle structured data efficiently. Finally, it delves into advanced topics like structure pointers, linked lists, and dynamic memory allocation.

structure
struct personne
typedef
12p0
Pointer Manipulation and Functions in C

The document provides an overview of pointer usage in C programming, particularly focusing on handling single pointers, double pointers, triple pointers, and arrays. It demonstrates the declaration of pointers and the invocation of various functions that use these pointers. The methodology emphasizes the distinction between arrays and pointers when passing parameters. The findings underline the correct ways to pass pointers to functions and avoid common mistakes such as including '&' with arrays.

pointers
function calls
arrays
1p0
TP N°: 4-5 - Programming in Assembly Language

This document provides a comprehensive guide on programming in assembly language. It introduces the structure and components of assembly programs, including segment declarations (data, stack, and code), variable initialization, and pseudo-instructions for memory management. It explores key operations like defining and utilizing stacks, procedures, and message handling using DOS interrupts. The document also includes practical exercises to create and manipulate tables, display messages on the screen, and work with keyboard inputs, emphasizing debugging and optimization.

Assembly Language
Interrupt 21h
Pseudo-instructions
15p0
TP3: Objets, Classes

This document outlines a programming exercise focused on creating and manipulating a `Point` class in Java. It specifies developing private attributes for coordinates and methods for accessors, mutators, displaying, and translating points. A `main` method is to be implemented for testing various functionalities, including coordinate modification and user input. The exercise emphasizes understanding object-oriented principles through practical tasks.

Point class
translate method
object-oriented programming
Faculté des Sciences de Bizerte1p0
TP 2

This document introduces six exercises focused on fundamental programming tasks. Exercises involve creating patterns, performing basic arithmetic operations, and implementing variable manipulation. It also includes practices for calculating perimeter and surface of geometric shapes, division operations, and time conversion. The exercises aim to develop computational problem-solving skills in a structured manner.

programming
arithmetic operations
variable manipulation
1p0
TP2: Éléments traditionnels de Java

This document is a lab exercise focused on object-oriented programming (OOP) in Java. It includes two programming tasks: identifying whether a given integer is a multiple of 2, 3, or 5 and classifying a set of integers as positive, negative, zero, and even or odd. Both exercises emphasize conditional logic and loop implementation to process input and deliver comprehensive outputs. Example executions are provided to clarify expected functionality and results.

Java
multiple detection
object-oriented programming
Faculté des Sciences de Bizerte1p0

Autres ressources en programmation