Giter VIP home page Giter VIP logo

c's Introduction

C

C - Cours - FormationVidéo

Pré requis

Tutoriel Windows - installer MinGW

Compiler un fichier en C avec Gcc

	gcc variables.c -o variables
	
	# "variables.c" fichieren entrée
	# "variables" programme en sortie 

Mots réservés

Langage C #3 - variables

Ces mots sont utilisés par le langage C et ne sont pas à employer pour nommer vos variables, structures, fonctions, ...

  • auto
  • bool
  • break
  • case
  • char
  • const
  • default
  • do
  • double
  • else
  • enum
  • extern
  • float
  • for
  • goto
  • if
  • int
  • long
  • register
  • return
  • short
  • signed
  • sizeof
  • static
  • struct
  • switch
  • typedef
  • union
  • unsigned
  • void
  • volatile
  • while

Types de données

Types simples

Langage C #3 - variables

⚠ Attention au type char, dont son usage ne garantit pas une occupation mémoire de 1 octet !

Signés

Syntaxe Occupation mémoire Fourchette de valeurs
char ? ?
signed char 1 octet -128 à 127
short 2 octets -32 768 à 32 767
int 2 octets / 4 octets -32 768 / -2 147 483 648 à 32 767 / 2 147 483 647
long 4 octets -2 147 483 648 à 2 147 483 647
long long 8 octets -9 223 372 036 854 775 808 à 9 223 372 036 854 775 807
float 4 octets -3,4.1038 à 3,4.1038
double 8 octets -1,7.10308 à 1,7.10308
long double 10 octets -1,1.104932 à 1,1.104932

Non signés

Syntaxe Occupation mémoire Fourchette de valeurs
unsigned char 1 octet 0 à 255
unsigned short 2 octets 0 à 65 535
unsigned int 2 octets / 4 octets 0 à 65 635 / 4 294 967 295
unsigned long 4 octets 0 à 4 294 967 295
unsigned long long 8 octets 0 à 18 446 744 073 709 551 615

Types étendus

L'utilisation de ces types nécessite l'ajout de l'en-tête stdint.h à votre fichier source. De plus, étant optionnels, il n'y a aucune garantie de leur portabilité.

Signés

Fixe Minimale Maximale Rapide Correspondance
int8_t int_least8_t - int_fast8_t signed char
int16_t int_least16_t - int_fast16_t short
int32_t int_least32_t - int_fast32_t int
int64_t int_least64_t intmax_t int_fast64_t long long

Non signés

Fixe Minimale Maximale Rapide Correspondance
uint8_t uint_least8_t - uint_fast8_t unsigned char
uint16_t uint_least16_t - uint_fast16_t unsigned short
uint32_t uint_least32_t - uint_fast32_t unsigned int
uint64_t uint_least64_t uintmax_t uint_fast64_t unsigned long long

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.