max = a>b ? a>c?a:c:b>c?b:c | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

max = a>b ? a>c?a:c:b>c?b:c

assume values for a, b and c. what will be stored in max? (if this statement is executed in turbo c). also explain it.

28th Aug 2019, 3:17 AM
Scarlet
2 Answers
+ 2
Scarlet max will store the maximum value of a, b and c. Parenthesis below show the order of operations. It'll help shed some light. max = a>b ? (a>c?a:c):(b>c?b:c)
28th Aug 2019, 4:47 AM
portpass
0
Let A =20 B=10 C = 5 True condition for A>B which is A>C?A:C is executed resulting in returning A 's value. This returns the greatest of three numbers.
28th Aug 2019, 3:35 AM
_rk
_rk - avatar