EmbLogic's Blog

unexpected output of operation on post n pre increment operators

int main()

{

int g,l;

int l=100;

g=l- – + l++;

printf(“g = %d”,g);

return 0;

}

 

predicted output:200

 

actual output:198

why??

post incrmt r given d higher pref…then ans should be 200.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>