+ 4
For exemple this number : 35672825189..it's an intger ? Will be declared just int or long int ?
8 Antworten
+ 20
The int storage type has many different versions that the compiler decides it to be at compile time when it's optimizing. This number if you split it up properly: 35,672,825,189 is larger than a long int. In fact it is the size of approximately 2 long integers (a long int is the size of 4 bytes or 2^32 bits.). Which means that we have 8 bytes. The compiler would most likely use dynamic memory and mark it as an Int64(2^64 bits) which is the largest it can be without going out of bounds.
+ 3
yes, it's an integer and will be declared as long int or won't be possible to store it
+ 3
not necessarely, you can do it without dynamic memory
+ 1
can i use the dynamic memory in this case ?
+ 1
it's a long long, a 64 bit integer. int and long int are the same afaik, both are 32 bit, and your number is bigger than that.
0
Long int should be used to store that number u mentioned as it is not possible to store such a larger value in int...
- 1
Its a long int
- 1
Have you Facebook