???

2 views
Skip to first unread message

Ashish Gupta

unread,
Jun 9, 2012, 2:16:11 PM6/9/12
to techt...@googlegroups.com
Look at following pseudocode:
 
 
 
int i=0;
 
 
i=i++;
 
 
print(i);
 
 
 
It gives output as:
 
[a] On Gnu C Compiler (aka gcc): 1
 
[b] On Turbo C Compiler : 1
 
[c] On Javac Compiler: 0
 
[d] On Visual Studio's C Compiler (aka CL): 0
 
 
Now the question arises:
 
-Why this difference occurs?
 
-How can it be Compiler dependent or Programming Language dependent?
 [We follow same Precedence and associativity Rules in C and Java]
 
 
Post clear and detailed explanation for the same.
Reply all
Reply to author
Forward
0 new messages