Exercices - Programmation
95 documents à télécharger gratuitement
Exercices de programmation partagés par des étudiants et des enseignants. Thèmes couverts : algorithmique, langage C, Java, Python, POO, structures de données.
This document contains exercises focused on process management, including the use of commands like ps and exec. It covers various tasks involving the creation and management of processes in a programming context. The exercises are aimed at enhancing the understanding of process IDs, environmental variables, and the use of system functions.
This lab focuses on red-black trees, their properties, and exercises to demonstrate understanding. It includes the identification of red-black trees from given examples and exercises to prove logarithmic height in relation to the number of nodes. The document concludes with corrections and explanations for the exercises.
This document presents the main exam for the OO Design module in a second-year computer science course. It involves automating a video cassette loan management system and developing a class diagram based on a given object diagram. Additionally, it addresses the requirements for a real-estate management system for a property company.
This document provides an in-depth overview of advanced algorithmic concepts, covering elementary abstract data types such as lists, stacks, and queues, their definitions, operations, and implementations through arrays and pointers. It enumerates specific algorithmic techniques including dynamic programming, divide-and-conquer strategies, and sorting algorithms. The syllabus also delves into graph theory, categorizing directed and undirected graphs, and algorithm complexity analysis. Finally, various exercises are provided to reinforce the implementation and manipulation of data structures...
This document provides an in-depth overview of elementary abstract data types, including lists, stacks, and queues, along with their operations, properties, and implementations using arrays and pointers. It introduces advanced topics such as trees (binary, binary search, AVL) and graphs (directed, undirected), as well as algorithm complexity analysis and problem-solving strategies like divide-and-conquer. The syllabus includes detailed explanations, visualizations, and exercises aimed at implementing key operations for optimal efficiency.
This document outlines core concepts of data structures and algorithms. It covers various abstract data types such as lists, stacks, and queues, along with their operations and implementations. Significant attention is given to different forms of trees (binary, binary search, AVL) and graph structures, along with algorithm complexities and advanced methodologies like divide-and-conquer and dynamic programming. The syllabus also includes details on internal and external sorting algorithms and practical exercises for implementing these structures and algorithms in programming environments.
This document outlines a series of exercises focusing on manipulating linked lists in various contexts. It covers singly and doubly linked lists, algorithms for insertion, deletion, sorting, and searching, as well as domain-specific applications like polynomial representation, client management, and voting. The exercises aim to develop a comprehensive understanding of data structures through practical implementations and real-world scenarios.
This document presents a series of exercises focused on linked data structures like singly and doubly linked lists, ranging from list creation, insertion, and traversal to specific applications like polynomials, customer management, election results, and student ranking based on averages. Each exercise builds on fundamental algorithms to process, sort, and represent data efficiently. It emphasizes user-defined inputs and outputs, flexible manipulations of structures, and application-specific solutions in real-world scenarios. Advanced tasks introduce ranking and scoring mechanisms for aggre...
This document systematically introduces linked lists, exploring both singly and doubly linked structures. Ten exercises progressively guide students through fundamental operations, including insertion, deletion, search, and custom manipulations, applied to various contexts like polynomial representation, voting systems, and student record management. More advanced challenges include managing client data for automated selection and calculating rankings based on grades in a dynamic student database. These tasks integrate theoretical explanations and algorithmic implementations, promoting prac...
The document is a comprehensive guide to assembly language programming, including segment declaration for data, stack, and code, as well as the use and manipulation of variables, arrays, and procedures. It outlines initialization techniques for data and stack segments, introduces pseudo-instructions such as DB, DW, and DD, and explains the organization of code with examples of procedures and interrupt service routines. Moreover, it provides practical exercises for memory management, displaying messages, interacting with the keyboard, and manipulating and processing arrays, along with explan...
This document introduces the concept of recursion in programming, contrasting it with iterative approaches. It explains direct and mutual recursion with detailed examples, including factorial computation through iterative and recursive methods. Principles for writing recursive functions, such as incorporating base cases, are emphasized to avoid infinite recursion. Additionally, the document provides multiple exercises for practicing recursive and iterative techniques in C programming, highlighting their applications.
This document introduces the concept of recursion in programming, explaining its mechanics and differences compared to iterative programming techniques. It demonstrates the recursive and iterative implementations of classic problems, such as calculating factorials, summing integers, and computing powers. Key aspects of recursive functions, including base cases and general cases, are outlined to prevent potential inefficiencies or infinite recursion. Additional examples highlight both correct and flawed recursive approaches, emphasizing common pitfalls and best practices.
This document is an exam-like exercise series designed to test foundational knowledge in pointers for first-year computer science students. The exercises involve filling tables based on pointer arithmetic operations and memory address manipulations, writing C programs to perform array manipulations using pointers, and solving pointer-related problems. The methodology focuses on practical application of pointer concepts with step-by-step implementations. Students are challenged to predict outcomes in pointer behavior and program execution within the C programming language.
This document provides a series of practical exercises on programming with pointers, targeted towards first-year computer science students. The exercises encompass analyzing and modifying pointer operations within C programs, calculating pointer arithmetic, and creating programs to manipulate arrays using pointers. Key methodologies include tracing pointer behavior step-by-step, implementing array operations, and debugging. Essential findings include insights into the behavior of memory addressing, pointer arithmetic, and various pointer-based algorithms for array manipulation.
This document is an exam focused on programming with pointers in C language. It contains exercises involving pointer manipulation, addressing, and operations in arrays along with pointer arithmetic. The exercises range from completing given programs and tables to writing new algorithms that solve specific problems like removing elements from an array or reversing array contents using pointers. Each task assesses understanding of low-level memory management and logic implementation.
This document presents a series of programming exercises designed for first-year computer science students to practice and learn structured programming in C. The exercises involve tasks such as converting 'for' loops to 'while' loops, solving second-degree equations, building arithmetic tables, converting character cases, binary transformations, text manipulation, and data compression using encoding. Each problem challenges students to implement algorithms that enhance their logical reasoning and programming skills.
This document provides a collection of programming exercises for C language learners, targeting specific logical structures such as loops and conditionals. The exercises include implementing mathematical equation solvers, character manipulation, text transformations, and data compression algorithms. A significant portion of these exercises challenges students to translate 'for' loops into 'while' loops and handle user input effectively. The document concludes with practical string and mathematical operations that help reinforce critical programming skills.
This document is a problem set focused on binary file operations and dynamic data structures using C programming. It includes exercises to manage binary student record files, such as creating, modifying, and displaying records. The tasks emphasize handling dynamic memory allocation for variable-sized data and using auxiliary indexing files for optimized access. Additionally, it provides a practical application of file handling and struct-based data management.
The document outlines programming exercises focused on binary file handling in C as part of an advanced programming workshop. Exercise 1 involves implementing a system to create, read, display, and modify a binary file containing student records. Exercise 2 focuses on managing dynamic records with varying numbers of grades and simultaneously maintaining an index file to track record sizes. Both exercises emphasize the use of structs and dynamic memory allocation, requiring functions for file population, data retrieval, and record manipulation.
This document provides a hands-on overview of file handling concepts in programming, specifically focusing on binary file operations. Two structured exercises are included, covering the creation, management, and manipulation of binary files for student data. The first exercise focuses on operations like file population, student retrieval by rank, and dynamic array copying. The second exercise introduces the concept of file indexing, with emphasis on record sizes and targeted retrieval using functions to populate and display student and index file contents.
This document provides a series of C programming exercises focused on string manipulation, including working with palindromes, counting specific characters, reversing strings, deleting specific characters from a string, and replacing substrings with others of either the same or different lengths. Sample implementations and algorithms are provided for each exercise, highlighting intricate string operations through the use of pointers and loops. The exercises include practical applications such as checking for palindromes, reversing strings without altering original data, and modifying string...
This document provides detailed examples of five C programming exercises focused on string manipulation. It covers palindromes using both array and pointer formalism, string reversal, counting specific characters, replacing substrings with equal or different lengths, and removing specific characters from a string. The explanations include both code snippets and expected outputs, demonstrating practical applications. A step-by-step approach is provided for beginner-level students to grasp fundamental C programming skills.
This document is a practical guide on C programming, focusing on string manipulation. It provides detailed examples and solutions to common programming tasks, such as palindrome verification, counting occurrences of a character, reversing strings, and modifying content with substitution in various scenarios. With each exercise, the document demonstrates algorithm implementation using both array and pointer formalism and includes complete, runnable code to enhance the learner's understanding.





















