{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

midterm2003_fall_final_sol_wf

# midterm2003_fall_final_sol_wf - 24 October 2003 COMP 102...

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

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

View Full Document
24 October, 2003 COMP 102 -- Midterm Exam Version A Page 2 of 12
24 October, 2003 COMP 102 -- Midterm Exam Version A Page 3 of 12 1. (5 points) Which of the following lines contains a valid C++ identifier? (Write True or False in the corresponding boxes). A. SHENZHOU#5 B. SHEN_ZHOU_5 C. SHENZHOU5! D. Oct_24_2003 E. 24_Oct_2003 2. (5 points) Given int a = 1, b = 4, c = 6, d = 2, x = 2, y = 3, z = 2 ; What is the value of each of the following expressions? a) (4 + 5 * a >= b – 4) || (c – 8)_______ true _______ b) c%x || b == 9/z && (d – 3) ________ true _______ c (c / d ) && (y > 5/2) ________ true ________ d) a/b + y-- ________ 3 ___________ e) ++x - --z ________ 2 ___________ False True True False False

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

View Full Document
24 October, 2003 COMP 102 -- Midterm Exam Version A Page 4 of 12 3 . (10 points) What is the value of n after each of the following C++ statements are executed ?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern