HW2 - learned. (4 points) 7. If you attempt to add an int,...

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

View Full Document Right Arrow Icon
COP 3502: HW 2 – CHAPTER 2 DUE DATE: FRIDAY JAN. 27 1. 5 / 4 is _____ (1 point) A. 0 B. 1.25 C. 1.0 D. 1 2. What is implicit casting? What is explicit casting? (4 points) 3. What is "Welcome" + 1 + 1*2? (1 point) A. Welcome12 B. Welcome3 C. Welcome4 D. Welcome11*2 4. -15 % -4 is _____ (1 point) A. 0 B. 3 C. -1 D. -3 E. -2 5. The result of an integer division is the integer part of the division; the fraction part is truncated. (1 point) A. false B. true
Background image of page 1

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

View Full DocumentRight Arrow Icon
6. How can we get input from user? Describe all the methods you have
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: learned. (4 points) 7. If you attempt to add an int, a byte, a long, and a float, what data type is the result? (int, byte, long, float or maybe impossible?) (2 points) 8. To declare an int variable x with initial value 200, you write (1 point) A. int x = 200l; B. int x = 200.0; C. int x = 200; D. int x = 200L; 9. How do you display character (single quote)? (2 point) 10. What is overflow? What is underflow? (3 points)...
View Full Document

Page1 / 2

HW2 - learned. (4 points) 7. If you attempt to add an int,...

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