*
im using devc compiler
*
when if(c>i) is encountered  since integer has higher precedence over char
,so char is type casted to int
so, (c>i) is equivalent to (-64>-32) which is false ,so fail1 is printed,
 -16 is converted to 4,294,967,295 - 16=4,294,967,280(so it is unsigned now)
for(i<u)
integer i is converted to unsigned int so (unsigned int)i=4,294,967,264
so(i<u)==>(4,294,967,264<4,294,967,280) is true
so output is pass2

http://stackoverflow.com/questions/5563000/implicit-type-conversion-rules-in-c-operators
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V40F_HTML/AQTLTBTE/DOCU_067.HTM

(plz correct me if im wrong)

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to