
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Size of int and 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).
Advertisements