Computer Science, asked by thotyactinnoty, 9 months ago

What will be the output of the following segment of code? float fa,ce; ce=89.57; fa=ce*9/5+32;

Answers

Answered by avnigoswami0337
0

Explanation:

Since 9 and 5 are integers, integer arithmetic happens in subexpression (9/5) and we get 1 as its value.

To fix the above program, we can use 9.0 instead of 9 or 5.0 instead of 5 so that floating point arithmetic happens.

Similar questions