data_types.html

来自「ssd5 数据结构的课件」· HTML 代码 · 共 129 行

HTML
129
字号
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>  <head>    <meta name="generator" content="HTML Tidy for Linux/x86 (vers 1st October 2002), see www.w3.org">    <title>C/C++ Data Types</title>  </head>  <body bgcolor="#ffffff">    <table width="100%" bgcolor="#eeeeff">      <tr>        <td><a href="index.html">cppreference.com</a> -&gt; C/C++ Data Types</td>      </tr>    </table>    <h1>C/C++ Data Types</h1>    <p>There are five data types for C: <strong>void</strong>, <strong>integer</strong>,    <strong>float</strong>, <strong>double</strong>, and <strong>char</strong>.</p>    <table>      <tr>        <th>Type</th>        <th>Description</th>      </tr>      <tr bgcolor="#eeeeff">        <td>void</td>        <td>associated with no data type</td>      </tr>      <tr>        <td>int</td>        <td>integer</td>      </tr>      <tr bgcolor="#eeeeff">        <td>float</td>        <td>floating-point number</td>      </tr>      <tr>        <td>double</td>        <td>double precision floating-point number</td>      </tr>      <tr bgcolor="#eeeeff">        <td>char</td>        <td>character</td>      </tr>    </table>    <br>    <br>         <p>C++ defines two more: <strong>bool</strong> and <strong>wchar_t</strong>.</p>    <table>      <tr>        <th>Type</th>        <th>Description</th>      </tr>      <tr bgcolor="#eeeeff">        <td>bool</td>        <td>Boolean value, true or false</td>      </tr>      <tr>        <td>wchar_t</td>        <td>wide character</td>      </tr>    </table>    <br>    <br>         <h2>Type Modifiers</h2>    <p>Several of these types can be modified using <strong>signed</strong>, <strong>unsigned</strong>,    <strong>short</strong>, and <strong>long</strong>. When one of these type modifiers is used by itself, a    data type of <strong>int</strong> is assumed. A complete list of possible data types follows:</p>    <table>      <tr bgcolor="#eeeeff">        <td>bool</td>      </tr>      <tr>        <td>char</td>      </tr>      <tr bgcolor="#eeeeff">        <td>unsigned char</td>      </tr>      <tr>        <td>signed char</td>      </tr>      <tr bgcolor="#eeeeff">        <td>int</td>      </tr>      <tr>        <td>unsigned int</td>      </tr>      <tr bgcolor="#eeeeff">        <td>signed int</td>      </tr>      <tr>        <td>short int</td>      </tr>      <tr bgcolor="#eeeeff">        <td>unsigned short int</td>      </tr>      <tr>        <td>signed short int</td>      </tr>      <tr bgcolor="#eeeeff">        <td>long int</td>      </tr>      <tr>        <td>signed long int</td>      </tr>      <tr bgcolor="#eeeeff">        <td>unsigned long int</td>      </tr>      <tr>        <td>float</td>      </tr>      <tr bgcolor="#eeeeff">        <td>double</td>      </tr>      <tr>        <td>long double</td>      </tr>      <tr bgcolor="#eeeeff">        <td>wchar_t</td>      </tr>    </table>    <h2>Type Sizes and Ranges</h2>    <p>The size and range of any data type is compiler and architecture dependent. The "cfloat" (or    "float.h") header file often defines minimum and maximum values for the various data types. You can use    the <a href="keywords_details.html#sizeof">sizeof</a> operator to determine the size of any data type, in    bytes. However, many architectures implement data types of a standard size. <strong>ints</strong> and    <strong>floats</strong> are often 32-bit, <strong>chars</strong> 8-bit, and <strong>doubles</strong> are    usually 64-bit. <strong>bools</strong> are often implemented as 8-bit data types.</p>  </body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?