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.
2 Respuestas
+ 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)
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.