+ 3
Verstappen
Because operation happens from right to left. So first it will be divide then assign to double variable.
You can also do this
double a=(double)22/7;
+ 2
Because you are dividing two integers
(22 and 7)
So, the result will be an integer.
try 22.0/7 or 22/7.0 or 22.0/7.0
+ 2
in the C language if you divide
numbers the type of the result will be the type with max memory,
so:
int/int = int
double/int =double
....
so in your case,
double a=22/7;
you just convert an int into a double.
+ 1
it will be double, why...? I don't know hhhh
+ 1
zak aria, Verstappen implicit conversion isn't only about size in memory, you can see the documentation here:
https://en.cppreference.com/w/c/language/conversion