Open Shiv15072001 opened 3 weeks ago
windows 10
VS CODE with c extension gcc version 6.3.0 and online c compiler.
int main(){
float a[5] = {10.4,44.4,556.55,33.43,55.33}; float *ptr1 = &a[0]; float *ptr2 = ptr1 + 3; printf("%f\n", *ptr2); printf("%f", (int)(ptr2 - ptr1)); return 0;
}
Expected ouput is:- 33.430000 3.0000000
Actual output is:- 33.430000 33.429993
i can't find possible fix
Bug report
OS information
windows 10
VS CODE with c extension gcc version 6.3.0 and online c compiler.
Steps to reproduce
include
int main(){
}
More resources
Expected ouput is:- 33.430000 3.0000000
Actual output is:- 33.430000 33.429993
Possible fix
i can't find possible fix