Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@nareshkumar6539-BKuVbx • Jun 20, 2012
yes answer is 2 2 2
assignment operator is right associative
c=a=0? (a=1)😔b=2); will be divided into two parts
so first of all
a=0?(a=1)😔b=2); will be executed in that statement first a=1 and b=2 will be assigned.
In conditional operator if condition is true first part will be executed otherwise second part will be executed
0 means it is false so b value will be assigned to a.now a contains 2, after that next assignement will be take plase i.e c value will be replaced by a value i.e now c also contains 2. -
@nikumbh-lmTCgS • Jun 23, 2012
@nareshkumar653 thanks a lot... 😀