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 157 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
Excellent


aruss1303

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

 

Did you know?

Your skin wrinkles if you stay in the bathtub a long time because the outermost layer of skin (which consists of dead keratin) swells when it absorbs water. It is tightly attached to the skin below it, so it compensates for the increased area by wrinkling. This happens to the hands and feet because they have the thickest layer of dead keratin cells.

Did you know?

According to the CDC, approximately 31.7% of the U.S. population has high low-density lipoprotein (LDL) or "bad cholesterol" levels.

Did you know?

Astigmatism is the most common vision problem. It may accompany nearsightedness or farsightedness. It is usually caused by an irregularly shaped cornea, but sometimes it is the result of an irregularly shaped lens. Either type can be corrected by eyeglasses, contact lenses, or refractive surgery.

Did you know?

It is believed that the Incas used anesthesia. Evidence supports the theory that shamans chewed cocoa leaves and drilled holes into the heads of patients (letting evil spirits escape), spitting into the wounds they made. The mixture of cocaine, saliva, and resin numbed the site enough to allow hours of drilling.

Did you know?

The human body's pharmacokinetics are quite varied. Our hair holds onto drugs longer than our urine, blood, or saliva. For example, alcohol can be detected in the hair for up to 90 days after it was consumed. The same is true for marijuana, cocaine, ecstasy, heroin, methamphetamine, and nicotine.

For a complete list of videos, visit our video library