
Assume a
int units;
float mass;
double weight;
and the following statement:
weight = mass * units;
Which automatic data type conversion will take place?
A) mass is demoted to an int, units remains an int, and the result of mass * units is an int.
B) units is promoted to a float, mass remains a float, and the result of * mass units is a float.
C) units is promoted to a float, mass remains a float, and the result of mass * units is a double.

Learn your wayIncludes step-by-step video

Chapter 3 Solutions
Starting Out with C++ from Control Structures to Objects, Student Value Edition (9th Edition)
Additional Engineering Textbook Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Concepts Of Programming Languages
SURVEY OF OPERATING SYSTEMS
Starting Out with Python (4th Edition)
Degarmo's Materials And Processes In Manufacturing
Electric Circuits. (11th Edition)
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning




