Program to illustrate Associativity of Increment/Decrement Operator


     # include <iostream.h>
     int main( )
     {
    int x = 4, y = 9;
    int z;
    z = (x++) + (--y) + y ;
    cout << "\n Value  =  " <<z;
    z =(--x) + x + (y--) ;
    cout << "\n Value  =  " <<z;
        return 0;
      }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|