vb20225 vb20225
  • 20-02-2021
  • Computers and Technology
contestada

int iNum = (int) 38.78;

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 25-02-2021

Answer:

iNum = 38

Explanation:

Given

int iNum = (int) 38.78;

Required

What is the value of the variable?

In the above instruction, the variable is iNum and its value is 38

This is so, because int iNum = (int) 38.78; means that the integer part of 38.78 be stored in iNum.

In 38.78, the integer part is 38 and the fractional part is 0.78.

Hence, 38 will be saved in iNum and the 0.78 be discarded

Answer Link

Otras preguntas

Sentence with the word admirable
Which is easier to observe, physical or chemical properties? why?
What is the total for a $4.70 item with a 6% sales tax with a 20% off discount?
What organelle carries certain molecules from place to place within a cell
What is meant by "The Scramble for Africa " a competition for colonies a race to control trade routes mining rights rain forest ownership?
How would you model 5x2/3?
Which of the following would not be considered a vernacular language of the Middle Ages? a. German c. English b. Latin
Which one of the following is NOT a simple machine? A. lever B. pulley C. hammer D. inclined plane
what US action in 1941 angered the Japanese and resulted in the bombing of Pearl Harbor?
A number c is a prime factor of both 35 and 98. What is the value of c