Programmation

782 documents à télécharger gratuitement

Cours, examens, TD, TP et exercices de programmation. Thèmes couverts : algorithmique, langage C, Java, Python, POO, structures de données.

Assembly Language Programming Guide: Data Declarations, Stack, and Procedures

This document serves as a comprehensive instructional guide for assembly language programming with a focus on data declarations, stack usage, and procedures. It provides structured explanations of segment declarations (data, stack, and code), variable initialization rules, and pseudo-instruction usage. Detailed examples for defining variables, using the stack, and writing procedures are included. Practical exercises are provided for implementing message display, keyboard input storage, and manipulation of tables in memory, enabling hands-on learning and debugging validation.

assembly language
DOS interrupts
stack operations
12p0
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
Assembler Programming Techniques and Exercises

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...

Assembly language
DB
DW
12p0
Remplissage et affichage d’un tableau dynamique de n étudiants

This document contains C code for managing a dynamic array of student records, including their identification, grades, and birth dates. Key functions cover memory allocation, data entry, average grade calculation, and display of student data. The program utilizes dynamic memory allocation techniques and implements modular functions for efficiency. The methodology relies heavily on loops, modular programming, and function pointers to manipulate the student records effectively.

Dynamic Arrays
malloc function
Data Structures
3p0
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
Structures in C Programming

This document comprehensively introduces the concept of structures ('struct') in the C programming language, highlighting their syntax, declaration methods, and usage in storing heterogeneous data types. Special attention is given to struct-related operations like member access, initialization, assignment, and comparison. Applications include defining structures for representing entities like planets, guiding users through the application of functions to create, display, and compare structured data. Advanced topics such as pointers to structures and dynamic memory allocation using `malloc`...

Structure
typedef
struct personne
12p0
Structures and Their Applications in C Programming

This document introduces and explains data structures in the C programming language, focusing on struct types. The tutorial covers the definition, initialization, and manipulation of structures, including methods for declaring variables, passing structures as function parameters, and utilizing arrays of structures. Advanced concepts like pointers to structures, dynamic memory allocation using malloc and calloc, and linked structures are also explained in detail. Applications include creating and comparing planetary data models using structured data types.

struct
malloc
pointers in C
12p0
Introduction to Recursion and Examples in C Programming

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.

recursion
factorial
base cases
4p0
La récursivité dans la programmation en C

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.

recursion
iterative vs recursive
factorial
4p0
Série les pointeurs

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.

pointers
array manipulation
C programming
2p0
Study on Pointers and Programming Exercises

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.

pointers
C language
memory addressing
2p0
Série les pointeurs

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.

pointers
C language
low-level programming
2p0
Programming Exercises in C for First-Year Computer Science Course

This document presents a series of C programming exercises tailored to first-year Computer Science students. The exercises focus on implementing repetitive structures, manipulating strings, and solving mathematical and text-processing problems. Key tasks include reimplementing loop-based programs with alternative structures, solving quadratic equations programmatically, and processing and transforming character-based input. The exercises encourage logical reasoning while developing proficiency in C, covering fundamental programming concepts and use cases.

C programming
for loop
while loop
2p0
Série les structures alternatives et répétitives

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.

C programming
for loop
while loop
2p0
Proposed Programming Exercises in C - AU 2011-2012

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.

C programming
for loop
while loop
2p0
Série Algo2 : Enregistrements, Pointeurs, Allocation de la Mémoire

This document contains a series of algorithmic exercises aimed at first-year Computer Science students. It includes tasks involving static and dynamic memory structures, such as arrays and records, to handle data about students, employees, and library management. The exercises emphasize coding problems like sorting students by grades, calculating employee salaries within given dates, and tracking library books borrowed. The focus is on practical problem-solving using algorithms, with the implementation of key programming constructs like functions, procedures, and dynamic storage management.

algorithm
dynamic and static arrays
sorting algorithm
2p0
Série Algo2 : Enregistrements, Pointeurs, Allocation de la Mémoire

This document consists of a series of exercises designed to test students' proficiency in algorithm design and implementation, focusing on data structures such as static and dynamic arrays, records, and pointers. Key tasks include designing algorithms for data management, such as processing student records based on averages, calculating salaries of employees based on work hours and date range, sorting and managing records, and determining availability of books in a library system. These exercises involve utilizing functions and procedures, managing memory allocation, and computing outputs b...

algorithm design
array manipulation
static arrays
2p0
Série Algo2 : enregistrements, pointeurs, allocation de la mémoire

This document focuses on a series of algorithmic exercises encompassing data structures and memory management. The exercises involve tasks such as calculating averages, processing employee payroll and attendance, sorting students based on grades, managing library systems, and utilizing static and dynamic arrays. Each task emphasizes writing algorithms to manipulate records and execute operations within structured data models. Key methodologies include usage of functions, procedures, and sorting techniques to address real-world computational problems.

data structures
dynamic arrays
record management
2p0
Atelier de programmation avancée - Série les fichiers binaires

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.

Binary file operations
C programming
Dynamic memory allocation
2p0
Atelier de Programmation Avancée - Série Les Fichiers Binaires

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.

struct
dynamic memory allocation
binary file management
2p0
Atelier de programmation avancée - Série les fichiers binaires

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.

binary file
struct
dynamic array
2p0
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
Analysis of Pointer Mechanisms in C-Based Functions

This document elaborates on the use of pointers in C programming to manipulate variables, arrays, and structured data types such as 'ETUDIANT'. It describes various function prototypes and their usage, emphasizing how pointers interact with individual variables, arrays, and structures. The code highlights best practices for passing addresses and underscores distinctions between direct pointers and pointers to pointers. It provides specific guidance on the handling of arrays by addressing their inherent properties, avoiding unnecessary dereferencing.

pointers
C programming
array handling
1p0
Les boucles 1ère année licence informatique – langage C (pgm1)

This document presents a series of programming examples in C, focusing on loops (while, for) and their output behavior. Each example emphasizes understanding how loop constructs work and their effects on variables. Topics include nested loops, variable increments, and program flow. The questions aim to strengthen the grasp of logic implementation in C programming for first-year computer science students.

C programming
loops
nested loops
2p0

Autres ressources en programmation