langage c - lenselense.institutoptique.fr/ressources/.../notions/... · - notions avancées -...

18
Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE Langage C Introduction Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE Institut d’Optique / 1A / S5 / Langage C / Informatique pour le Traitement de l’Information

Upload: others

Post on 08-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE

Langage CIntroduction

Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE

Institut d’Optique / 1A / S5 / Langage C / Informatique pour le Traitement de l’Information

Page 2: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE

Institut d’Optique / 1A / S5 / Langage C / Informatique pour le Traitement de l’Information

L'ÉQUIPE PÉDAGOGIQUERESPONSABLE : SYLVIE LEBRUN

- Charles BOURASSIN-BOUCHET- Xavier DELEN- Julien VILLEMEJANE

INTERVENANTS PERMANENTS

- Maha BOUHADIDA- Antoine TENART- Bastien ROUZE

INTERVENANTS

Page 3: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE

DEROULEMENT

SÉANCES 0-1-2- Introduction au langage

C par l’exemple- Bonnes pratiques

SÉANCES 6-7- Notions avancées

- Pointeurs

- Allocation dynamique

SÉANCES 3-4-5

SÉANCE 10- Présentation orale

- 1 fonction / 1 membre

- Liste préalable

SÉANCE 11- Finalisation projet

Institut d’Optique / 1A / S5 / Langage C / Informatique pour le Traitement de l’Information

- Notions de base- Tableaux 1D

- Fonctions

- Gestion de fichiers

- Presentation mini-projet

SÉANCES 8-9- Projet en groupe

Page 4: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE

OBJECTIFS

PROGRAMMATION / LANGAGE C- Introduction au langage C par l’exemple- Langage de base - Réalisation d’un mini-projet autour des images

SYSTÈME À MICROPROCESSEUR- Fonctionnement d’un système à microprocesseur- Programmation bas niveau- Gestion de la mémoire- Vers des langages plus évolués

Institut d’Optique / 1A / S5 / Langage C / Informatique pour le Traitement de l’Information

Page 5: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE

A PARTIR DE LA SÉANCE 8

MINI-PROJET / TRAITEMENT D’IMAGES- Travail en groupe (4 étudiants)

- CALCULER L’HISTOGRAMME - AFFICHER L’HISTOGRAMME

- Ouvrir le fichier ASCII en lecture- Afficher l’en-tête du fichier- Ré-afficher l’image en console- Créer un tableau histogramme

OBJECTIF PRINCIPAL

OBJECTIFS INTERMÉDIAIRES

- Créer un fichier PGM- Ecrire l’en-tête du fichier- Créer une image DAMIER

- N x N cases de K pixels chacune- Créer une image à partir d’un tableau

1D (type histogramme)

Institut d’Optique / 1A / S5 / Langage C / Informatique pour le Traitement de l’Information

Page 6: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE

EVALUATION

PROJET - 4 points / Présentation

(étudiant aléatoire + notation par autres équipes)

- 2 points / Résultat final

EXAMEN- 7 points / QCM- 7 points / Problème

CRITÈRES- Lisibilité du code : commentaires, indentation, variables...- Explications claires- Qualité du code : algorithme efficace- Réutilisation possible du code : modularité

Institut d’Optique / 1A / S5 / Langage C / Informatique pour le Traitement de l’Information

Page 7: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Sylvie LEBRUN / Charles BOURASSIN / Julien VILLEMEJANE

PETIT QUESTIONNAIRE

NOM / Prénom

LANGAGES INFORMATIQUES- C / Python / C++ / Autres

+ Niveau : début. / avancé / expert- Scilab / Matlab / Maple

Section / Lycée-Ville

Institut d’Optique / 1A / S5 / Langage C / Informatique pour le Traitement de l’Information

Si PYTHON- Quelles utilisations ?

Maths appliquées / IHM / Programmation objet - Quelle distribution ?

Pyzo ou scientifique / Anaconda / Autre (nom)

Page 8: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Institut d’Optique / Elec Info 1A / S5

LangC / S5

A quoi sert l’ INFORMATIQUE

Informatique

Page 9: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Informatique / Pour quoi ?- Aide aux calculs- Traitement de l'information- Automatisation de calculs / de tâches- Télécommunications- Stockage de l'information

1652La PASCALINE

1940La BOMBE / Turing

2000ASIMO

2016GOOGLE / Datacenter2014

GOOGLE / Datacenter

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Informatique

Page 10: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

Informatique / Comment ?- Différents langages

Langages informatiques

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Page 11: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

- Différents langages / Différentes applications

SIMULATION

IHM CALCUL 3D

WEB

Langages informatiques

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Informatique / Comment ?

Page 12: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

- Différents langages / Différentes applications- Comparatif des temps de calcul

SIMU

IHMCALCUL 3D

WEB

Calcul des 30 premiers termes de la suite de Fibonacci Itération de 1M de fois le calcul

sans affichage

LANGAGE COMPILÉ

LANGAGE INTERPRÉTÉ

PORTABILITERAPIDITE

Langages informatiques

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Informatique / Comment ?

Page 13: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

- Calculateur / Machine

SIMULATION

IHM CALCUL 3D

WEB

MACHINE

Calculateurs

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Informatique / Comment ?

Page 14: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

SIMU

IHMCALCUL 3D

WEB

- Calculateur / Machine

MACHINE

PROCESSEUR

AMD Phenom – 4 coeurs – 3.4 GHz

- Exécution séquentielle d’instructions

- Unité(s) de calculs précablée(s)

Calculateurs

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Informatique / Comment ?

Page 15: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

SIMU

IHMCALCUL 3D

WEB

- Calculateur / Machine

MACHINE

PROCESSEUR

AMD Phenom – 4 coeurs – 3.4 GHz

- Exécution séquentielle d’instructions

- Unité(s) de calculs précablée(s)

MÉMOIRES

- Stockage temporaire mais rapide

- Stockage à long terme mais “lent”

25 Go / s

Calculateurs

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Informatique / Comment ?

Page 16: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

PC - INTEL

SIMU

IHMCALCUL 3D

WEB

MACHINE

Calculateurs

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Page 17: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

- Système d’exploitation / Operating System OS

SIMULATION

IHM CALCUL 3D

WEB

OS

MACHINE

Systèmes d’exploitation

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Informatique / Comment ?

Page 18: Langage C - LEnsElense.institutoptique.fr/ressources/.../Notions/... · - Notions avancées - Pointeurs - Allocation dynamique SÉANCES 3-4-5 SÉANCE 10 - Présentation orale - 1

- Système d'exploitation

SIMU

IHMCALCUL 3D

WEB

OS

MACHINE

CHEF D’ORCHESTRE

- Gère l’ensemble des ressources matérielles- Attribue les ressources en gérant les

priorités aux applications

LIEN ENTRE MATÉRIEL ET LOGICIELS

- Gère l’ensemble des périphériques / Drivers

LANCEMENT D’UNE APPLICATION

Systèmes d’exploitation

JULIEN VILLEMEJANE / Institut d’Optique / LEnsE

Informatique / Comment ?