Thread
:
Quiz Time
View Single Post
#
66
(
permalink
)
05-08-2008, 01:43 PM
rjuyal
Senior Member
Join Date: Mar 2008
Location: Delhi, India
Posts: 187
answer is
Code:
Value is: - 2.0
Reason being
a>5 evaluates to false so the answer should be
Code:
Value is: - 2
but,
2.3 ( double) and 2(int) are of different types. So the type chosen by Ternary will be by rule of promotion, hence 2 will be converted to 2.0
and the answer is
Code:
Value is: - 2.0
__________________
i am the future
rjuyal
View Public Profile
Send a private message to rjuyal
Find all posts by rjuyal