as per my logic the answer is NOT OK...
because see the line
(num!=(num=--num))?cout<<"OK":cout<<"NOT OK";
is a ternary operator and
the words num=--num means that the num value is decreased by one and it is assigned to num
so now the new value of num is 109 and
the latter set of staments compares
109 with 109 [ since we know that -- operator decreases it by one so the answer is "not ok"

if u need more clear explanation i m ready to explain..
hav a gud day..