Quiz 1 Solution

# Quiz 1 Solution - int x y y = 5 a x = 3(4 2 18 b x = y 6 11...

This preview shows page 1. Sign up to view the full content.

Name: _________________________ Quiz One [10 points] 1) Give an example of the following: [3 points] a) an integer value: 1 b) a character value: ‘a’ c) a floating-point value: 3.14 2) What would be the most appropriate data type for a variable that stores: [3 points] a) a temperature (e.g. 98.6 ): float b) a letter grade (e.g. A ) : char c) a year (e.g. 2008 ) : int 3) What is the value assigned to x in each of the statements below? [2 points]
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int x, y; y = 5; a) x = 3 * (4 + 2); 18 b) x = y + 6; 11 4) List one of the steps in the five-step problem solving process. [2 points] 1. State the problem clearly 2. Describe the input and output information 3. Work the problem by hand for a simple case 4. Develop a solution and convert it into a program 5. Test the solution...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online