Vous êtes sur la page 1sur 29

Chap 0-1

Introduction to computer
programming
Plan
Présentation du module
Les références bibliographiques
Autres ressources utiles
Présentation du module
Voir syllabus
Les références bibliographiques
Le langage C / Norme ANSI (auteur, K et R) (telecharger de moodle)
Le guide complet du langage C (Claude Delannoy) (Bibliotheque)
Le C en 20 heures ERIC BERTHOMIER & DANIEL SCHANG libre 2011
Autres ressources utiles
https://fr.wikibooks.org/wiki/Programmation_C
http://www.tutorialspoint.com/c_standard_library/
Les cinq avantages de la certification
Pourquoi devriez-vous opter pour une certification? Quelle est la
valeur d'une certification pour vous et pour votre employeur?
Une certification est, avant tout, un diplôme reconnu mondialement
qui atteste que vous métrisiez des technologies, des plateformes, des
outils, ou des pratiques ou standards spécifiques, obtenu via des tests
standardisés et accrédités.
Une certification démontre aussi votre dévouement et votre
motivation. Une fois que vous aurez une certification, vous re-
joigneriez un groupe restreint d'individus avec des compétences
démontrées.
Avoir une certification montre aussi que vous possédez non seulement
une connaissance approfondie d'une technologie, mais vous vous
souciez aussi à votre propre carrière.

http://www.new-vision.ma/formations/14-publications/40-les-cinq-avantages-de-la-certification.html
Le langage C, vous appelle!
0.1 Introduction to IDE and online tools
Plan: Work environment
Windows
Mise en place de CodeBlocks
http://www.codeblocks.org/downloads/26
MinGW
Virtual Box
Linux: gedit / gcc
NOTE: The codeblocks-16.01mingw-setup.exe file
includes additionally the GCC/G++ compiler and GDB
debugger from TDM-GCC (version 4.9.2, 32 bit, SJLJ).
Windows
Where to begin?
What is IDE? (Integrated Development Environment)
Linux
Mise en place d’un machine virtuelle
Virtual Box
"ubuntu 12.04"
Choose your IDE
On-line tools: ideone
On-line tools:
codepad
Ce qu’on a couvert
Mise en place de l’environnement de développement
Cas windows
Cas Linux en machine virtuelle
Le langage C a sa creation
Le langage C a été développé par un collègue de Ken Thompson, Dennis Ritchie qui
pensait d'abord faire uniquement un New B ou NB. Mais en plus des caractères,
Ritchie ajouta les tableaux, les pointeurs, les nombres à virgule flottante, les
structures...
1972 fut l'année de développement la plus productive et sans doute l'année de
baptême de C.
En 1973, le langage C fut suffisamment au point pour que 90 % d'UNIX puisse être
récrit avec.
En 1974, les laboratoires Bell ont accordé des licences UNIX aux
universités et c'est ainsi que le langage C a commencé à être
distribué.
21 avril 1999, le président Bill Clinton donne la Médaille nationale de la
technologie pour le développement d'UNIX, le langage C et son impact
sur l'industrie de la technologie à Dennis Ritchie et Ken Thompson.
Chap 1
Introduction to
computer programming
Plan
1.1 Different languages for different purposes
1.2 Your first program
1.3 Integer values, integer variables and comments
1.1 Different languages
for different purposes
1.1.1 Natural language vs programming
language (1)
1.1.4 Further readings
Among the hundreds of books written
about the “C” language, there is one which
is particularly recommendable.
The book has been issued dozens of times
all around the world and is available in over
20 different (natural) languages.
1.2 Your first program
1.2.1 Your first program (1)
1.3 Integer values,
integer variables and
comments
1.3.1 Numbers and how the computers
see them

the numbers handled by modern computers are of two types:


• integers, that is, those which are devoid of the fractional part
• floating-point numbers (or simply floats), that contain (or are
able to contain) the fractional part
1.3.1 Numbers and how the computers
see them
we’ll deal only with integers. There are two additional conventions
The first one use the numbers in an octal representation. If an integer
number is preceded by the 0 digit, it will be treated as an octal value. This
means that the number must contain digits taken from the [0..7]range only.

0123 is an octal number with the (decimal) value equal to 83.


The second allows us to use hexadecimal numbers. This type of number
should be preceded by a prefix written as 0x or 0X.
0x123 is a hexadecimal number with the (decimal) value equal to 291.
1.3.2 A variable is variable (1)
What does every variable have? 10t (does not being with a letter)
•a name Adiós_Señora (contains illegal characters)
•a type
•a value
Exchange Rate (contains a space)

variable
i
t10
Exchange_Rate
counter
DaysToTheEndOfTheWorld
TheNameOfAVariableWhichIsSoLongThatYouWillNotBeAbleToWriteItWithoutMistakes
_
1.3.3 A variable is variable (2)
int Counter;
int variable1, account_balance, invoices;
assignment operator
Counter = 1;
Result = 100 + 200;
x = x + 1;
1.3.8 Keywords – why they are the keys?
int int;
int Int;
1.3.9 Comments on the comments (1)
/* Counter variable counts the number of sheep in the meadow */
int Counter;
/************************************************* Counting sheep
version 1.0 Author: Ronald Sleepyhead, 2012 email: rs@insomnia.org Changes: 2012-
09-13: Ginny Drowsy: counting black sheep improved
*************************************************/
/* int i; /* int j; */ int k; */ (nested comments)

Vous aimerez peut-être aussi