# q2 sol6 - CSCI.1100 Computer Science I Quiz 2 September...

This preview shows pages 1–3. Sign up to view the full content.

CSCI.1100 Computer Science I Quiz 2 September 21st, 2009 Closed book, closed notes, no computers or calculators of any kind. Name: RCS login: Circle your lab section: (01 MTh 10:00) (02 MTh 12:00) (03 MTh 2:00) (04 MTh 4:00) (05 MTh 6:00) (06 MTh 10:00) (07 TF 10:00) (08 TF 12:00) (09 MTh 12:00) (10 TF 2:00) (11 MTh 4:00) The time spent on each question should be proportional to the number of points 1. Suppose the variables k , m and n are declared to be type int and have been assigned the following values: k = 3; m = 2; n = 1; What do the following IF statements display ? (2 points) if (k >= m + 2 * -1 || m - 1 > n) { cout << "Chelsea"; } else { cout << "Arsenal"; } Chelsea cout << "Chelsea"; } else { cout << "Arsenal"; } Chelsea

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

View Full Document
2. Circle the names below that are valid identifier names in C++. (3 points) _amy_cole 1O_4 float main for if_for 3. a) Which of these numbers represents the largest value? (1 point) 1000010 2 94 10 51 16 b) What is the base 10 representation of the binary number 10.10?
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/04/2011 for the course CORE 101 taught by Professor Poop during the Spring '08 term at Rensselaer Polytechnic Institute.

### Page1 / 4

q2 sol6 - CSCI.1100 Computer Science I Quiz 2 September...

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

View Full Document
Ask a homework question - tutors are online