sidneydominguez8516 sidneydominguez8516
  • 07-08-2019
  • Mathematics
contestada

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

Respuesta :

erinna erinna
  • 12-08-2019

Answer:

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.

Answer Link

Otras preguntas

what does it mean learner permit??????
I HAVE OVER ONE HUNDRED DRAWINGS> HERE ARE FIVE OF THEM> IF U WANNA BUY ANY TELL ME NOW THANK U!!!!
Express the following numbers in the Standard form 5x10-⁵​
hi, how do we do this question?​
Type the correct answer in the box. Spell all words correctly. What does natural resource management aim at? Natural resource management aims at______ managemen
Hello everyone can someone help me answer this question
What event motivated China to launch its self-strengthening movement in the 19th century?
Charley spends all of his income on soft drinks and pizza. Suppose he is currently buying these products in amounts such that his marginal benefit from an addit
Find questions attached.Show workings.​
Can anyone explain me?​