quiz3_001_sol

quiz3_001_sol - CS 010 Intro to Computer Science I Fall -...

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

View Full Document Right Arrow Icon
CS 010 – Intro to Computer Science I Fall - 2007 Quiz 3 – Thursday 10/18 – section 001 SOLUTION Each question is worth 1 point. 1. Which of the following data types are NOT built-in to the language C++? (Hint: you do not need to include a library to use a built-in type) a. int b. Time c. string d. double e. b) and c) f. None of the above - they are all built-in 2. In C++, a variable of one of the built-in data types which has been declared but not initialized will be: a. set by the compiler to zero b. set by the compiler to a random number between 0 and 100 c. hold a "junk" value, representing a random value in the range of the variable's datatype d. flagged by the compiler as an error 3. What value will be stored in the variable centigrade after the following statements have executed? double fahrenheit, centigrade; fahrenheit = 104.0; centigrade = (fahrenheit - 32) * (5 / 9); a. 0.0 b. 1.0 c. 40.0 d. 72.0 e. this is a mixed-type expression, and will result in a compiler error 4. The concept of "class" in object-oriented programming could be likened to:
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

quiz3_001_sol - CS 010 Intro to Computer Science I Fall -...

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