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 153 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
Wow, this really help


LegendaryAnswers

  • Member
  • Posts: 341
Reply 3 on: Yesterday
Gracias!

 

Did you know?

Malaria was not eliminated in the United States until 1951. The term eliminated means that no new cases arise in a country for 3 years.

Did you know?

Green tea is able to stop the scent of garlic or onion from causing bad breath.

Did you know?

Limit intake of red meat and dairy products made with whole milk. Choose skim milk, low-fat or fat-free dairy products. Limit fried food. Use healthy oils when cooking.

Did you know?

To prove that stomach ulcers were caused by bacteria and not by stress, a researcher consumed an entire laboratory beaker full of bacterial culture. After this, he did indeed develop stomach ulcers, and won the Nobel Prize for his discovery.

Did you know?

It is widely believed that giving a daily oral dose of aspirin to heart attack patients improves their chances of survival because the aspirin blocks the formation of new blood clots.

For a complete list of videos, visit our video library