TCS
Company
Category
Which of the following expressions results in 45.37?
(int)(45.378 * 100) / 100
2.5
(int)(45.378 * 100) / 100.0
(int)(45.378 * 100 / 100)
(int)(45.378) * 100 / 100.0
(int)(45.378) * 100f / 100.0
Read Solution (Total 4)
-
- None of them will give 45.37 as I compiled every option. Tcs often gives some dummy questions donot attempt them.
- 6 years agoHelpfull: Yes(1) No(1)
- Option 2
Int ( 45.378*100)/100
First multiply by 100 ans. 4537.8 converting of int 4537 now divide by 100 and 45.37 - 6 years agoHelpfull: Yes(0) No(0)
- (int)(45.378*100)/100
option 2 - 6 years agoHelpfull: Yes(0) No(0)
- (int)(45.378 * 100) / 100;
- 6 years agoHelpfull: Yes(0) No(0)
TCS Other Question