What is the value of z after the following code is executed?

int x = 5, y = 28;
float z;
z = (float) (y / x);

a. 5.6
b. 3.0
c. 5.0
d. 5.60


c. 5.0

Computer Science & Information Technology

You might also like to view...

name is a String object that contains user input. Write a segment of code that determines if name contains "George". If it does, print the message "Hey, that's my name too! "

What will be an ideal response?

Computer Science & Information Technology

(The Circle class) Implement the relational operators < in the Circle class in Listing 9.5 to order the Circle objects according to their radii.

``` class Circle { public: Circle(); Circle(double); double getArea(); double getRadius(); void setRadius(double); private: double radius; }; ```

Computer Science & Information Technology

To select objects with different color fills than the selected object, you would choose to select the ____.

A. opposite B. secondary C. negative D. inverse

Computer Science & Information Technology

The program used to close security holes is called a(n) ________

Fill in the blank(s) with correct word

Computer Science & Information Technology