+ 2

int myAge; .. now the "int" means ?

15th Jan 2017, 7:13 PM
Asif khan
Asif khan - avatar
8 odpowiedzi
+ 6
this means integer . (int 32 bits) in memory this mean that you want to allocate 32 bits (4 bytes).so it will contain from -2,147,483,648 to 2,147,483,647 only. if depass this limit (by adding 1 to the int.max(this means 2,147,483,647+1 ))then the number will turn to int.min, so here it will be -2,147,483,648 because of overflow which is not an exxeption (if you want to throw an exception when overflow happen then use the "checked{some code...}"). if you need another interval then use another type like uint, long etc.
15th Jan 2017, 7:53 PM
Ihab Taleb
Ihab Taleb - avatar
+ 5
This means that myAge can be used to store a number (integer) within a limited range (that depends on the compiler and architecture. ) There will be errors if you attempt to store incompatible.datatype in this variable such as decimals or larger numbers
15th Jan 2017, 8:54 PM
ifl
ifl - avatar
+ 4
integer
15th Jan 2017, 7:20 PM
Mihai Dancaescu
Mihai Dancaescu - avatar
+ 2
int means integer
16th Jan 2017, 7:16 PM
Kelvin Gathungu
Kelvin Gathungu - avatar
+ 1
int means integer
16th Jan 2017, 9:44 AM
RoHit Maindoliya
RoHit Maindoliya - avatar
+ 1
Thanks for explanation 😍
16th Jan 2017, 7:20 PM
Asif khan
Asif khan - avatar
+ 1
it's mean integer which is a simply a data type which store only integer value likes age ,contact number and any digit
25th Jan 2017, 6:25 PM
rachna kushwaha
rachna kushwaha - avatar
+ 1
it stores an integar number
28th Jan 2017, 3:11 PM
Ѧмєєя Нѧмӡѧ
Ѧмєєя Нѧмӡѧ - avatar