Ask Question
10 March, 12:08

Assume a program has the following variable defenition: int a, b = 2; float c = 4.2; and the following statement: a = b * c; What will be stored in a? A. 8.4 B. 8 C. 0 D. None of the above

+4
Answers (1)
  1. 10 March, 14:51
    0
    The correct option is B.

    Step-by-step explanation:

    In a program the variables are defined as

    int a, b = 2;

    float c = 4.2;

    The given statement is

    a = b * c

    a = 2 * 4.2

    a = 8.4

    It is given that variable a is an integer. So, only integer value can be stored in a.

    a ≈ 8

    It means 8 will be stored in a. Therefore the correct option is B.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assume a program has the following variable defenition: int a, b = 2; float c = 4.2; and the following statement: a = b * c; What will be ...” in 📙 Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers