hw2 - CS16, W11, UCSB LabHW2: Worth 50% of Lab02 score (50...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS16, W11, UCSB LabHW2: Worth 50% of Lab02 score (50 total points) Print this form, staple loose pages together, and write your answers on it. Accepted: on paper, at the *beginning* of *your* lab section on Thursday, January 20. Place on the front desk as you walk in, before getting seated. No email submission allowed. Name (2 pts): ______________________________________ Umail (2 pts): ______________________@umail.ucsb.edu Lab Section (2 pts) Circle one: 3:30 4:30 5:30 6:30 Read to the end of Chapter 2 in the Etter text. Then answer the following questions. 1. First do the "Practice!" exercises on page 46 and check your answers in the back of the text (this time we look up the location for you - it is page 410). Then focus on these statements from problem 2 of those exercises: int a = 27, b = 6; float c; ... c = a / (float)b; a. (6 pts) What is the meaning and what is the effect of the `(float)b` part of the last statement above? b. (2 pts) What would be the resulting value of c without the `(float)`
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

hw2 - CS16, W11, UCSB LabHW2: Worth 50% of Lab02 score (50...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online