Ask Question

Which of these uses of type casting will NOT ensure that f is 1.5?

int a (1), b (2), c (2), d (2), e (2); double f; f = (a + b) * c / static_cast (d + e); / / (ex1) f = static_cast (a + b) * c / (d + e); / / (ex2) f = (a + b) * static_cast (c) / (d + e); / / (ex3) f = static_cast ((a + b) * (c) / (d + e)); / / (ex4)

a. ex4

b. ex1

c. ex2

d. ex3

+5
Answers (1)
  1. 3 March, 17:48
    0
    a. ex4

    Explanation:

    The option a, which have thie function;

    f = static_cast ((a+b) * (c) / (d+e)); gives a value of 1.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Which of these uses of type casting will NOT ensure that f is 1.5? int a (1), b (2), c (2), d (2), e (2); double f; f = (a + b) * c / ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers