This topic contains a solution. Click here to go to the answer

Author Question: What value will z have if we execute the following assignment statement? int z = 50 / 10.00; (Read 151 times)

jc611

  • Hero Member
  • *****
  • Posts: 552

Question 1

What value will z have if we execute the following assignment statement?
float z = 5 / 10;
◦ z will equal 0.0
◦ z will equal 0.5
◦ z will equal 5.0
◦ z will equal 0.05
◦ none of these, a run-time error arises because z is a float and 5 / 10 is an int

Question 2

What value will z have if we execute the following assignment statement?
int z = 50 / 10.00;
◦ 5
◦ 5.0
◦ 50
◦ 10
◦ none of these, a run-time error arises because z is an int and 50 / 10.00 is not


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by jc611 on Aug 30, 2020

Benayers

  • Sr. Member
  • ****
  • Posts: 328
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




jc611

  • Member
  • Posts: 552
Reply 2 on: Aug 30, 2020
:D TYSM


  • Member
  • Posts:
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

During the twentieth century, a variant of the metric system was used in Russia and France in which the base unit of mass was the tonne. Instead of kilograms, this system used millitonnes (mt).

Did you know?

For about 100 years, scientists thought that peptic ulcers were caused by stress, spicy food, and alcohol. Later, researchers added stomach acid to the list of causes and began treating ulcers with antacids. Now it is known that peptic ulcers are predominantly caused by Helicobacter pylori, a spiral-shaped bacterium that normally exist in the stomach.

Did you know?

Autoimmune diseases occur when the immune system destroys its own healthy tissues. When this occurs, white blood cells cannot distinguish between pathogens and normal cells.

Did you know?

Eating carrots will improve your eyesight. Carrots are high in vitamin A (retinol), which is essential for good vision. It can also be found in milk, cheese, egg yolks, and liver.

Did you know?

The tallest man ever known was Robert Wadlow, an American, who reached the height of 8 feet 11 inches. He died at age 26 years from an infection caused by the immense weight of his body (491 pounds) and the stress on his leg bones and muscles.

For a complete list of videos, visit our video library