Download presentation
Presentation is loading. Please wait.
Published byKathlyn Patience Patrick Modified over 9 years ago
1
Programming I Final Exam 2010-2011 - Review
2
Question..True or False (Please click on the answer...) Variables hold data that may change while the program is running. True False
3
Question..True or False (Please click on the answer...) Another term for integers is whole numbers. True False
4
Question..True or False (Please click on the answer...) Initializing a variable means assigning a value to it. True False
5
Question..True or False (Please click on the answer...) C++ keywords cannot be used as identifiers. True False
6
Question..True or False (Please click on the answer...) In C++ it is possible to declare more than one variable in one statement. True False
7
Question..True or False (Please click on the answer...) In C++ it is possible to declare more than one variable in one statement. True False
8
Question..True or False (Please click on the answer...) Boolean variables are those that can have only three possible values. True False
9
Question..True or False (Please click on the answer...) In C++ constants hold data that does not change as the program runs. True False
10
Question..True or False (Please click on the answer...) Constants do not have data types. True False
11
Question..True or False (Please click on the answer...) The modulus operator is the % sign. True False
12
Question..True or False (Please click on the answer...) Overflow occurs when a number is too small for a variable. True False
13
Question..True or False (Please click on the answer...) The * operator performs multiplication. True False
14
Question..True or False (Please click on the answer...) Floating-point precision can affect calculations. True False
15
Question..True or False (Please click on the answer...) The % operator returns the remainder of integer division. True False
16
Question..True or False (Please click on the answer...) The number 5.6e15 is an example of exponential notation. True False
17
Question..True or False (Please click on the answer...) A floating-point number would be truncated if it were converted to an integer. True False
18
Question..True or False (Please click on the answer...) Floating-point rounding errors can occur if you are not aware of the data types used in calculations. True False
19
Question..True or False (Please click on the answer...) Most algorithms follow a single path from beginning to end. True False
20
Question..True or False (Please click on the answer...) Programs sometimes have to make decisions based on the wishes of the user. True False
21
Question..True or False (Please click on the answer...) Logical operators allow an expression to evaluate more than one condition. True False
22
Question..True or False (Please click on the answer...) Structures that make decisions in C++ programs are called sequence structures. True False
23
Question..True or False (Please click on the answer...) The if/else structure is also called a two- way selection structure. True False
24
Question..True or False (Please click on the answer...) A statement block has to end with a semicolon after the right curly brace. True False
25
Question..True or False (Please click on the answer...) Programs sometimes have to make decisions based on the wishes of the user. True False
26
Question..True or False (Please click on the answer...) C++ identifiers can begin with a letter or number. True False
27
Question..Multiple Choice (Please click on the answer...) What is another term for integer? a.Whole number b.Fractional number c.Floating point number d.Character
28
Question..Multiple Choice (Please click on the answer...) Which of the following is a legal identifier? a.Number of cars b.4saleprice c.double d.number_of_cars
29
Question..Multiple Choice (Please click on the answer...) Boolean variables can have how many different values? a.1 b.2 c.3 d.4
30
Question..Multiple Choice (Please click on the answer...) Which of the following is the proper way to declare and initialize a constant? a.const double PI = 3.14159; b.double PI = 3.14159; c.const PI = 3.14159; d.PI = 3.14159;
31
Question..Multiple Choice (Please click on the answer...) When variables are first declared: a.They have a value of zero. b.They reveive the default value for their data type. c.They have an indeterminate value. d.They have a value of null.
32
Question..Multiple Choice (Please click on the answer...) Which of the following is true of naming variables? a.Variable names can have spaces b.Variable names can begin with numbers c.Variable names may contain an underscore d.Variable names may also be C++ keywords
33
Question..Multiple Choice (Please click on the answer...) Another name for exponential notation is: a.Long notation b.Unsigned notation c.Scientific notation d.Floating point notation
34
Question..Multiple Choice (Please click on the answer...) What must identifiers begin with? a.A number b.A letter c.An integer d.A space
35
Question..Multiple Choice (Please click on the answer...) A group of characters put together to form a word or phrase is called: a.A byte b.A message c.A string d.An ASCII stream
36
Question..Multiple Choice (Please click on the answer...) Which of the following statements is a valid way to initialize multiple variables to the same value of a single statement line? a.X, y, z = 200; b.X = y = z = 200; c.X; y; & z= 200; d.X & Y & Z = 200;
37
Question..Multiple Choice (Please click on the answer...) The highest precedence when evaluating an expression is a.Addition or subtraction b.Minus sign used to change sign c.Multiplication and division d.None of these
38
Question..Multiple Choice (Please click on the answer...) An overflow condition occurs when a.A value is too large for its data type b.A decimal value is stored into an integer field c.Too many variables are defined in one program d.An integer is divided by a floating-point number
39
Question..Multiple Choice (Please click on the answer...) If y=3 and z=5, the statement x = y + ++z; will return a value of _____. a.8 b.9 c.10 d.11
40
Question..Multiple Choice (Please click on the answer...) The symbol used in C++ for the modulus operator is the a.& b.* c.% d.$
41
Question..Multiple Choice (Please click on the answer...) A variable set to a Boolean value of false will contain a(n) ____ in memory. a.one b.zero c.F d.No
42
Question..Multiple Choice (Please click on the answer...) Which of the following statements does not use a relational operator? a.x = (4 > 5); b.x = (4 <= 5); c.x = (4 != 5); d.x = (4 = 5);
43
Question..Multiple Choice (Please click on the answer...) The symbol used for the not logical operator is a.& b.! c.- d.~
44
Question..Multiple Choice (Please click on the answer...) Decision-making structures in C++ are called ____ structures. a.sequence b.selection c.control d.branching
45
Question..Multiple Choice (Please click on the answer...) Which of the following shows the symbols that must surround a block of code for an if structure? a.[ ] b.( ) c.{ } d.: :
46
Question..Multiple Choice (Please click on the answer...) The ____ keyword can be used within a switch structure to execute specific code if no other conditions are matched. a.continue b.break c.if_other d.default
47
Question..Multiple Choice (Please click on the answer...) Which operator is used to represent "less than or equal to"? a.< b.>= c.<= d.=<
48
Question..Multiple Choice (Please click on the answer...) In the problem solving steps of software development, which step occurs after program documenting? a.Run the program. b.Test the results. c.Write code for the program. d. Algorithm development.
49
Question..Multiple Choice (Please click on the answer...) Name an issue that is not important during problem solving for a programming team. a.Writing style b.Technique c.Rewriting code d.Communication
50
Question..Multiple Choice (Please click on the answer...) What can a valid identifier not consist of? a.Forward slashes b.Underscore c.Letters d. Digits
51
Question..Multiple Choice (Please click on the answer...) Tell if the expression is double, int, or neither: 3.0 + 4.0 a.double b.int c.neither
52
Question..Multiple Choice (Please click on the answer...) Tell if the expression is double, int, or neither: 5 / 3 a.double b.int c.neither
53
Question..Multiple Choice (Please click on the answer...) Which of the following statements would assign the value of 40 to the variable Test8? a.Test8 < = 40 b.Test8 = 40 c.40 = Test8 d.cin >> (Test8 = 40)
54
Question..Multiple Choice (Please click on the answer...) Which of the following expressions would assign the sum of A, B, and C to the variable D? a.D = A + B + C b.A + B + C = D c.D <= A + B + C d.sum (D = A + B + C)
55
Question..Multiple Choice (Please click on the answer...) Which is not a C++ data type? a.double b.constant c.int d.char
56
Question..Multiple Choice (Please click on the answer...) Which is not a relational operator? a.!! b.>= c.== d.>
57
Question..Multiple Choice (Please click on the answer...) Which of the following values can be assigned to a Boolean variable? a.15 b.T c.true d.tr
58
Question..Multiple Choice (Please click on the answer...) Given the statement: if (A > 70) || (A < 110).... which value of A would make this statement true? a.60 b.75 c.130 d.All of these.
59
Wrong Click on button to return to question slide.
60
Correct Click on button to return to question slide.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.