EmbLogic's Blog

E-12, Assignment 1

x=y=1; z=x++-1;
z+=-x++ + ++y;
printf(“%d\n”,x); here x=3; but
printf(“%d\n”,z); here z=?? and how??

2 Responses to E-12, Assignment 1

  1. saranjeet singh says:

    here the value of z will be equal to 0..
    becoz in first eqn i.e z=x++-1 , z=0…x=2

    in second eqn z=0 becoz (-x++ + ++y)=0
    -2 + 2 =0

Leave a Reply to saranjeet singh Cancel 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>