
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
What is the size of int, long type in C++ standard?
The C++ standard does not specify the size of integral types in bytes. It specifies the minimum range these types must be able to hold.
The size in bits can be easily found from the specified minimum range.
Not referring to the standard but the commonly used sizes for various platforms are −
- For 32-bit systems, the standard is ILP32 — that is, int, long and pointer are all 32-bit quantities.
- For 64-bit systems, the Unix standard is LP64 — long and pointer are 64-bit (but int is 32-bit). The Windows 64-bit standard is LLP64 — long and pointer are 64-bit (but long and int are both 32-bit).
- Related Articles
- What is the size of int, long type as per C++ standard?
- C++ Program to Convert long Type Variables to int
- C++ Program to Convert int Type Variables to long
- Golang Program to convert long type variables to int
- Golang Program to convert int type variables to long
- Haskell Program to convert long type variables into int
- Haskell Program to convert int type variables to long
- What is the difference between an int and a long in C++?
- Difference Between int and long
- Get the absolute value of float, int, double and long in Java
- How to find the size of an int[] in C/C++?
- Implicit return type int in C
- MySQL index on column of int type?
- What is the difference between const int*, const int * const, and int const *?
- Hexadecimal literal of type long in Java

Advertisements