The ANSI C standard says that the result is "implementation defined." This means that ANSI C has no hard and fast rule, therefore, the result depends on the compiler that you use. Check your compiler; it should give either -1 or -2 as a result.
Note that the "correct" answer is -1.2. The compiler therefore has a choice of rounding up or down.
No comments:
Post a Comment