what is the size of int in 64-bit machine?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sahitya v
    New Member
    • Oct 2012
    • 1

    what is the size of int in 64-bit machine?

    in a 16-bit machine size of int is 2bytes and in 32-bit machine size of int is 4bytes.... what is the size of int in a 64-bit machine??
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    The size of a type is not dependent upon the machine. Rather, it is dependent upon the implementaton of C or C++ that was used to compile the program.

    So you have to use sizeof to determine the type size of the implementation that was used to compile the program. For example, a 64-bit Windows machine can execute programs compied both as 32-bit and 64-bit.

    Comment

    • sgayathri2412
      New Member
      • Oct 2012
      • 8

      #3
      64 bit machine has int of 4 bytes.

      Comment

      Working...