Différences entre les versions de « Programmation C/Types de base »

Aller à la navigation Aller à la recherche
(typo)
|+ Domaines de valeurs '''minimaux''' des types entiers (C90 et C99) quelle que soit sa représentation (SVA, CPL1 ou CPL2)
! Type
! Taille
! Borne inférieure
! Borne inférieure (formule)
|-
| bgcolor="#F9F9F9" |<tt>signed char</tt>
| ≥ 8 bits
| style="background-color:#FFFFFF; text-align: right;" |-127
| style="background-color:#FFFFFF; text-align: right;" |-(2<sup>7</sup>-1)
|-----
| bgcolor="#F9F9F9" |<tt>unsigned char</tt>
| ≥ 8 bits
| style="background-color:#FFFFFF; text-align: right;" |0
| style="background-color:#FFFFFF; text-align: right;" |0
|-----
| bgcolor="#F9F9F9" |<tt>short</tt>
| ≥ 16 bits
| style="background-color:#FFFFFF; text-align: right;" |{{formatnum:-32767}}
| style="background-color:#FFFFFF; text-align: right;" |-(2<sup>15</sup>-1)
|-
| bgcolor="#F9F9F9" |<tt>unsigned short</tt>
| ≥ 16 bits
| style="background-color:#FFFFFF; text-align: right;" |0
| style="background-color:#FFFFFF; text-align: right;" |0
|-----
| bgcolor="#F9F9F9" |<tt>int</tt>
| ≥ 16 bits
| style="background-color:#FFFFFF; text-align: right;" |{{formatnum:-32767}}
| style="background-color:#FFFFFF; text-align: right;" |-(2<sup>15</sup>-1)
|-
| bgcolor="#F9F9F9" |<tt>unsigned int</tt>
| ≥ 16 bits
| style="background-color:#FFFFFF; text-align: right;" |0
| style="background-color:#FFFFFF; text-align: right;" |0
|-----
| bgcolor="#F9F9F9" |<tt>long</tt>
| ≥ 32 bits
| style="background-color:#FFFFFF; text-align: right;" |{{formatnum:-2147483647}}
| style="background-color:#FFFFFF; text-align: right;" |-(2<sup>31</sup>-1)
|-
| bgcolor="#F9F9F9" |<tt>unsigned long</tt>
| ≥ 32 bits
| style="background-color:#FFFFFF; text-align: right;" |0
| style="background-color:#FFFFFF; text-align: right;" |0
|-----
| bgcolor="#F9F9F9" |<tt>long long</tt> ''(C99)''
| ≥ 64 bits
| style="background-color:#FFFFFF; text-align: right;" |{{formatnum:-9223372036854775807}}
| style="background-color:#FFFFFF; text-align: right;" |-(2<sup>63</sup>-1)
|-
| bgcolor="#F9F9F9" |<tt>unsigned&nbsp;long&nbsp;long</tt> ''(C99)''
| ≥ 64 bits
| style="background-color:#FFFFFF; text-align: right;" |0
| style="background-color:#FFFFFF; text-align: right;" |0

Menu de navigation