CrazyEngineers
  • Please explain the evalution of this expression...!

    TheV

    Member

    Updated: Oct 26, 2024
    Views: 978
    int i=2;

    int j=4;

    int k=i++>j&2;

    What is the value in k...???
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • born_star16

    MemberSep 5, 2011

    According to me value of k will be 1.
    Are you sure? This action cannot be undone.
    Cancel
  • simplycoder

    MemberSep 6, 2011

    I think k will be 0.
    This is my analysis.
    relational preceeds over bitwise operator.
    current value of i=2 and j is 4
    so i>j will be 0
    0&2 will be 0
    this will make k=0.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register