En Course Introduction
En Course Introduction
Mohamed MESSABIHI
[email protected]
University of Tlemcen
Department of Computer Science
https://sites.google.com/site/informatiquemessabihi/
What Does "Programming" Mean?
• A calculator is a program.
• Your Microsoft Word is a program.
• Facebook is a program.
• Video games are programs.
• Spotify is a program
• ...
What Does "Programming" Mean?
Problem
How can we communicate with the computer in a simpler way than in
binary?
"Programming", indeed! But which language
should we use?
• The computer only understands machine language. For example, the
instruction "Perform the calculation 4 + 7" is translated into
machine language as: 0010110110010011010011110
Problem
How can we communicate with the computer in a simpler way than in
binary?
"Programming", indeed! But which language
should we use?
• The computer only understands machine language. For example, the
instruction "Perform the calculation 4 + 7" is translated into
machine language as: 0010110110010011010011110
Problem
How can we communicate with the computer in a simpler way than in
binary?
"Programming", indeed! But which language
should we use?
• The computer only understands machine language. For example, the
instruction "Perform the calculation 4 + 7" is translated into
machine language as: 0010110110010011010011110
Problem
How can we communicate with the computer in a simpler way than in
binary?
"Programming", indeed! But which language
should we use?
• The computer only understands machine language. For example, the
instruction "Perform the calculation 4 + 7" is translated into
machine language as: 0010110110010011010011110
Problem
How can we communicate with the computer in a simpler way than in
binary?
Programming Languages
• Invent new languages that can be translated into binary for the
computer.
• Invent new languages that can be translated into binary for the
computer.
• Invent new languages that can be translated into binary for the
computer.
• Invent new languages that can be translated into binary for the
computer.
Example C Program
# include < stdio .h >
int main () {
printf ( " Hello , World !\ n " ) ;
return 0;
}
• when you run this program, it will display "Hello, World!" on the
screen and then terminate with a success status of 0.
• This simple program is often used as a starting point for learning
new programming languages, as it provides a basic understanding of
how to output text to the console.
Comments in C
Example:
/* Below are preprocessor directives . These lines add files
to the project ,
files called libraries . Thanks to these libraries , we have
pre - made functions to display messages on the screen . */
int main ()
{
printf ( " Hello " ) ; // This instruction displays " Hello " on
the screen
return 0; // The program returns the number 0 and stops
}