C program different Output on different Compilers? -
this question has answer here:
here c program giving different output depending on compiler used:
#include<stdio.h> int main() { int = 5,j; j = ++i + i++ + ++i + i++; printf("%d",j); return 0; }
check output on following link.
http://imgur.com/z9amswj,vwx3p9s
http://imgur.com/z9amswj,vwx3p9s#1
my question technical reason output different?
the technical reason there no defined behaviour such operation, allowing compilers handle kind of order wish. such cases referred undefined behaviour.
Comments
Post a Comment