Created
January 29, 2014 09:29
-
-
Save Yago/2ef35f8bb5f57cbbb34d to your computer and use it in GitHub Desktop.
C - Fonctions basiques
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Ci-dessous, ce sont des directives de préprocesseur. | |
Ces lignes permettent d'ajouter des fichiers au projet, | |
fichiers que l'on appelle bibliothèques. | |
Grâce à ces bibliothèques, on disposera de fonctions toutes prêtes pour afficher | |
par exemple un message à l'écran. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
/* | |
Ci-dessous, vous avez la fonction principale du programme, appelée main. | |
C'est par cette fonction que tous les programmes commencent. | |
Ici, ma fonction se contente d'afficher Bonjour à l'écran. | |
*/ | |
int main() | |
{ | |
printf("Bonjour"); // Cette instruction affiche Bonjour à l'écran | |
return 0; // Le programme renvoie le nombre 0 puis s'arrête | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment