• <bdo id='h4OoA'></bdo><ul id='h4OoA'></ul>

    <small id='h4OoA'></small><noframes id='h4OoA'>

    <tfoot id='h4OoA'></tfoot>
  1. <i id='h4OoA'><tr id='h4OoA'><dt id='h4OoA'><q id='h4OoA'><span id='h4OoA'><b id='h4OoA'><form id='h4OoA'><ins id='h4OoA'></ins><ul id='h4OoA'></ul><sub id='h4OoA'></sub></form><legend id='h4OoA'></legend><bdo id='h4OoA'><pre id='h4OoA'><center id='h4OoA'></center></pre></bdo></b><th id='h4OoA'></th></span></q></dt></tr></i><div id='h4OoA'><tfoot id='h4OoA'></tfoot><dl id='h4OoA'><fieldset id='h4OoA'></fieldset></dl></div>
    1. <legend id='h4OoA'><style id='h4OoA'><dir id='h4OoA'><q id='h4OoA'></q></dir></style></legend>

      long 和 int 数据类型的区别

      时间:2023-08-29
      <tfoot id='3tn7z'></tfoot>

      <small id='3tn7z'></small><noframes id='3tn7z'>

          <i id='3tn7z'><tr id='3tn7z'><dt id='3tn7z'><q id='3tn7z'><span id='3tn7z'><b id='3tn7z'><form id='3tn7z'><ins id='3tn7z'></ins><ul id='3tn7z'></ul><sub id='3tn7z'></sub></form><legend id='3tn7z'></legend><bdo id='3tn7z'><pre id='3tn7z'><center id='3tn7z'></center></pre></bdo></b><th id='3tn7z'></th></span></q></dt></tr></i><div id='3tn7z'><tfoot id='3tn7z'></tfoot><dl id='3tn7z'><fieldset id='3tn7z'></fieldset></dl></div>
          • <bdo id='3tn7z'></bdo><ul id='3tn7z'></ul>
              <tbody id='3tn7z'></tbody>

              <legend id='3tn7z'><style id='3tn7z'><dir id='3tn7z'><q id='3tn7z'></q></dir></style></legend>
                本文介绍了long 和 int 数据类型的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                考虑到以下语句返回4,C++中的intlong类型有什么区别?

                Considering that the following statements return 4, what is the difference between the int and long types in C++?

                sizeof(int)
                sizeof(long)
                

                推荐答案

                来自 this 参考:

                一个 int 最初的目的是的自然"字大小处理器.许多现代处理器可以以相等的方式处理不同的字长轻松.

                An int was originally intended to be the "natural" word size of the processor. Many modern processors can handle different word sizes with equal ease.

                还有这一点:

                在许多(但不是全部)C 和 C++ 上实现,一个长大于一个整数.当今最流行的桌面平台,如 Windows 和 Linux,主要在 32 位处理器上运行,并且这些平台的大多数编译器使用具有相同大小的 32 位 int并表示为 long.

                On many (but not all) C and C++ implementations, a long is larger than an int. Today's most popular desktop platforms, such as Windows and Linux, run primarily on 32 bit processors and most compilers for these platforms use a 32 bit int which has the same size and representation as a long.

                这篇关于long 和 int 数据类型的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:为什么在 C++ 中存在从指针到 bool 的隐式类型转换? 下一篇:什么是 uint_fast32_t,为什么要使用它而不是常规的 int 和 uint32_t?

                相关文章

                <tfoot id='jxDLY'></tfoot>
                <i id='jxDLY'><tr id='jxDLY'><dt id='jxDLY'><q id='jxDLY'><span id='jxDLY'><b id='jxDLY'><form id='jxDLY'><ins id='jxDLY'></ins><ul id='jxDLY'></ul><sub id='jxDLY'></sub></form><legend id='jxDLY'></legend><bdo id='jxDLY'><pre id='jxDLY'><center id='jxDLY'></center></pre></bdo></b><th id='jxDLY'></th></span></q></dt></tr></i><div id='jxDLY'><tfoot id='jxDLY'></tfoot><dl id='jxDLY'><fieldset id='jxDLY'></fieldset></dl></div>

                <small id='jxDLY'></small><noframes id='jxDLY'>

                • <bdo id='jxDLY'></bdo><ul id='jxDLY'></ul>

                <legend id='jxDLY'><style id='jxDLY'><dir id='jxDLY'><q id='jxDLY'></q></dir></style></legend>