0
Why is the float type not the same as double?
Why is no; float a = 2.2; double b = 2.2; a == b? cout << "he" : cout << "no" ;
3 Answers
+ 2
Because a is of float type and b is of double type. You are comparing there not of equal references. Comparing float(less type) with higher type double. .
float is of 4 bytes normally and double occupies 8 bytes..
+ 2
ŠŠ½Š“ŃŠµŠ¹ ŠŠµŃŃŠ¾Š²
herre is a detailed answer:
https://stackoverflow.com/a/2386882/7959868
an example:
https://code.sololearn.com/cpKAj8sMnBIG/?ref=app