0

What is different between "Int" and "double" variables in C# ?

In both condition i got same digit. please explain double variables because I'm very confused b/w both

6th Jan 2018, 6:07 PM
Harshit Singh
Harshit Singh - avatar
4 Answers
+ 2
double also takes up twice as much space as int in many implementations (e.g. most 32-bit systems) . Short answer: int uses up 4 bytes of memory (and it CANNOT contain a decimal), double uses 8 bytes of memory. ... int is a binary representation of a whole number, double is a double-precision floating point number
6th Jan 2018, 6:21 PM
Mohammad Reza Eskandari
Mohammad Reza Eskandari - avatar
+ 2
think of int as solid numbers like 2,10,44.12032 and double like pi:3.14, 32.54 , 12.0
6th Jan 2018, 6:17 PM
Mohammad Reza Eskandari
Mohammad Reza Eskandari - avatar
+ 2
Thanks
6th Jan 2018, 6:58 PM
Harshit Singh
Harshit Singh - avatar
0
ur mean double Variable is for decimal digits
6th Jan 2018, 6:19 PM
Harshit Singh
Harshit Singh - avatar