The following code is simple. As expected, it should print 100, 100
.
#include <stdio.h>
#include <math.h>
int main(int argc, char const *argv[])
{
int a = 10, b, c;
b = pow(10, 2);
c = pow(a, 2);
printf("%d, %d\n", b, c);
return 0;
}
On OS X 10.10, clang, the result is as expected. On Windows 10, gcc, the result is however 100, 99
.
What is the cause of it?