How does the int and static_cast respond

How do I view what I have stored in an int x, after I have programmed and compiled this?

int x;
x = 3 / static_cast<int>(4.5 + 6.4);


Where will I see answerthat is now stored in x?
Does an int have decimal places or do I have to specify them, do they round or do I have to specify that?
I do not know how static_cast works and without seeing the x value...
closed account (jwC5fSEw)
An integer by definition doesn't have any decimal places. If you want decimals, use float or double.
So my output would be 0.
(4.5 + 6.4) = 10 int no decimals
3 / 10 = 0.3 but since it is an int it would display "0"
Yes.
Topic archived. No new replies allowed.