| |

VerySource

 Forgot password?
 Register
Search
Author: skyhlh

How many bytes does each element of an integer array take? Two or four? I didn't find the book

[Copy link]

0

Threads

7

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Invalid IP Address

Post time: 2020-8-23 15:00:01
| Show all posts
Oh, look at the maximum value of plastic in limits.h.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-23 15:15:01
| Show all posts
I think this is determined by the OS. A 32-bit system is 32/8=4, and a 16-bit system is 16/8=2. If it is a 64-bit system, it is 8. In fact, the size of the integer represents the size of the memory space that a needle can point to. For example, the current 32-bit system can only install 2^32=4G of memory
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-23 15:30:01
| Show all posts
I think this is determined by the OS. A 32-bit system is 32/8=4, and a 16-bit system is 16/8=2. If it is a 64-bit system, it is 8. In fact, the size of the integer represents the size of the memory space that a needle can point to. For example, the current 32-bit system can only install 2^32=4G of memory

==
Not clear enough! In fact, this depends on the compiler. Don't you know the concept of cross compilation?
Said it depends on the operating environment of the target code after the program is compiled. OS is almost the same.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list