Discussion
What is the size of int in C on a 32-bit system ?
Answer: C
On a 32-bit system an int is usually 4 bytes.
The C standard only requires int to be at least 16 bits, leaving the exact size to the compiler. On 32-bit (and most 64-bit) platforms, compilers make int 32 bits, which is 4 bytes, matching the natural word size of the processor.
2 bytes was the size of int on old 16-bit compilers such as Turbo C under DOS. 1 byte is the size of a char, and 8 bytes is typical of long long or of double.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development