if the program is: int var = 10; cout<<(var++ * var++); the result is 102 :omg: and if the program is like this: int var = 10; cout<<((var++)*(var++)); the result is 100; what i think is first the mutiplication operation is being taken place and the varible is getting incremented. in vc++ programming guide present in MSDN library unary operator (post increment) has the highest precedence ok u know the problem y it is happening pls send a mail
W
warlu
@warlu
Posts
-
visual c++ funny or its a bug? -
a class functionif the user enters 25 and more or the user enters -ve values for hours,the program will not prompt any error message and to find the difference, write a function where all the hours ,minutes and sec are compared with 59 mins , 59 secs convert to next hours and think ur logic bye thennati