Code:
#include<stdio.h>
#include<conio.h>
main()
{
  int a=5;
  int b=(a)+(++a)+(++a);
   printf("%d",b);
 getch();
}         // HERE THE OUTPUT COMES AS 21!!

#include<stdio.h>
#include<conio.h>
main()
{
  int a=5;
  int b=0;
  b=(a)+(++a)+(++a);
   printf("%d",b);
 getch();
}
// HERE THE OUTPUT COMES AS 19!!

WHY THIS VARIANCE IN OUTPUT IS OCCURING?? - PLEASE HELP!!!

Last edited by DaWei; 22Aug2007 at 10:51.. Reason: Added code tags; please grow up and do this yourself.