Program to illustrate precedence level of Unary Operator


     # include <iostream.h>
     int main( )
     {
    int a, b, c ;
    a = 2 ;
    b = 5 ;
    c = 10 ;
    cout << "value =  " << a + b * -c ;
    cout << "value =  " << - c / b * c - a ;
    cout << "value =  " << - a  + ++b % a ;
               return 0;
      }

0 comments:

Post a Comment

 
 
 
 


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