

Computer Science I Practice Exam
Course Introduction
Computer Science I is an introductory course that provides students with a foundational understanding of computer science principles and programming. Through hands-on experience, students learn the basics of algorithm development, problem-solving techniques, and the syntax and structure of a modern programming language. Core topics include variables, control structures, data types, functions, arrays, and basic input/output operations. The course also introduces fundamental concepts in software development, such as debugging, documentation, and code organization, equipping students with the essential skills needed for further study in computer science.
Recommended Textbook
Starting Out with C++ from Control Structures to Objects 9th Edition by Tony Gaddis
Available Study Resources on Quizplus
21 Chapters
949 Verified Questions
949 Flashcards
Source URL: https://quizplus.com/study-set/1368

2

Chapter 1: Introduction to Computers and Programming
Available Study Resources on Quizplus for this Chatper
47 Verified Questions
47 Flashcards
Source URL: https://quizplus.com/quiz/27271
Sample Questions
Q1) A volatile type of memory that is used for temporary storage is
A) an address
B) the ALU
C) RAM
D) a disk drive
E) None of these
Answer: C
Q2) Software engineering is a field that encompasses designing, writing, testing, debugging, documenting, modifying, and maintaining computer programs.
A)True
B)False
Answer: True
Q3) A set of well-defined steps for performing a task or solving a problem is known as a(n):
A) hierarchy chart
B) algorithm
C) instruction set
D) statement
E) None of these
Answer: B
To view all questions and flashcards with answers, click on the resource link above. Page 3

Chapter 2: Introduction to C
Available Study Resources on Quizplus for this Chatper
62 Verified Questions
62 Flashcards
Source URL: https://quizplus.com/quiz/27272
Sample Questions
Q1) C++ does not have a built-in data type for storing strings of data.
A)True
B)False
Answer: True
Q2) Select all that apply. Which of the following statements is(are) true about named constants?
A) A named constant must be all uppercase.
B) The content of a named constant is read-only.
C) The value of a named constant cannot be changed while the program is running.
D) A named constant is defined using the const qualifier.
E) None of these
Answer: B, C, D
Q3) The numeric data types in C++ can be broken into two general categories which are A) numbers and characters
B) singles and doubles
C) integers and floating-point numbers
D) real and unreal numbers
E) numbers and literals
Answer: C
To view all questions and flashcards with answers, click on the resource link above.
Page 4

Chapter 3: Expressions and Interactivity
Available Study Resources on Quizplus for this Chatper
45 Verified Questions
45 Flashcards
Source URL: https://quizplus.com/quiz/27273
Sample Questions
Q1) The __________ operator always follows the cin object, and the __________ operator follows the cout object.
A) binary, unary
B) conditional, binary
C) >>, <<
D) <<, >>
E) None of these
Answer: C
Q2) The cin << statement will stop reading input when it encounters a newline character.
A)True
B)False
Answer: True
Q3) Which of the following must be included in any program that uses the cin object?
A) compiler
B) the header file iostream
C) linker
D) brackets
E) None of these
Answer: B
To view all questions and flashcards with answers, click on the resource link above.
Page 5

Chapter 4: Making Decisions
Available Study Resources on Quizplus for this Chatper
51 Verified Questions
51 Flashcards
Source URL: https://quizplus.com/quiz/27274
Sample Questions
Q1) What is the value of donuts after the following statement executes?
int donuts = 10; if (donuts = 1)
\(\quad\)donuts = 0; else
\(\quad\)donuts += 2;
A) 12
B) 10
C) 0
D) 1
E) None of these
Q2) The default section of a switch statement performs a similar task similar to the __________ portion of an if/else if statement.
A) conditional
B) break
C) trailing else
D) All of these
E) None of these
To view all questions and flashcards with answers, click on the resource link above. Page 6

Chapter 5: Loops and Files
Available Study Resources on Quizplus for this Chatper
60 Verified Questions
60 Flashcards
Source URL: https://quizplus.com/quiz/27275
Sample Questions
Q1) A file must be __________ before data can be written to or read from it.
A) opened
B) closed
C) named
D) buffered
E) initialized
Q2) In a for statement, this expression is executed only once:
A) the test
B) null
C) initialization
D) validation
E) None of these
Q3) To write information to a file, use the
A) cout object
B) pen object
C) output object
D) stream insertion operator
E) None of these
To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: Functions
Available Study Resources on Quizplus for this Chatper
49 Verified Questions
49 Flashcards
Source URL: https://quizplus.com/quiz/27276
Sample Questions
Q1) One reason for using functions is to break programs into manageable units or modules.
A)True
B)False
Q2) Select all that apply. Which of the following statement(s) about global variables is(are) true?
A) A global variable is accessible only to the main function.
B) A global variable is declared in the highest-level block in which it is used.
C) A global variable can have the same name as a variable that is declared locally within a function.
D) A global variable is the same as a named constant.
E) If a function contains a local variable with the same name as a global variable, the global variable's name takes precedence within the function.
Q3) The value in a __________ variable persists between function calls.
A) dynamic
B) global
C) floating-point
D) static local
E) counter
To view all questions and flashcards with answers, click on the resource link above.
Page 8

Chapter 7: Arrays and Vectors
Available Study Resources on Quizplus for this Chatper
56 Verified Questions
56 Flashcards
Source URL: https://quizplus.com/quiz/27277
Sample Questions
Q1) The __________ is automatically appended to a character array when it is initialized with a string constant.
A) array name
B) number of elements
C) value of the first element
D) null terminator
E) None of these
Q2) Assume array1 and array2 are the names of two arrays. To assign the contents of array2 to array1, you would use the following statement: array1 = array2;
A)True
B)False
Q3) A(n) __________ can be used to specify the starting values of an array.
A) initialization list
B) array name
C) subscript
D) element
E) None of these
To view all questions and flashcards with answers, click on the resource link above.
9

Chapter 8: Searching and Sorting Arrays
Available Study Resources on Quizplus for this Chatper
30 Verified Questions
30 Flashcards
Source URL: https://quizplus.com/quiz/27278
Sample Questions
Q1) On average, an item is just as likely to be found near the beginning of an array as near the end.
A)True
B)False
Q2) Array elements must __________ before a binary search can be performed.
A) summed
B) set to zero
C) positive integers
D) sorted
E) None of these
Q3) A(n) __________ search uses a loop to sequentially step through an array.
A) binary
B) unary
C) linear
D) relative
E) None of these
Q4) The linear search repeatedly divides the portion of an array being searched in half.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Pointers
Available Study Resources on Quizplus for this Chatper
47 Verified Questions
47 Flashcards
Source URL: https://quizplus.com/quiz/27279
Sample Questions
Q1) Which of the following statements deletes memory that has been dynamically allocated for an array?
A) int array = delete memory;
B) int delete[ ];
C) delete [] array;
D) new array = delete;
E) None of these
Q2) When you work with a dereferenced pointer, you are actually working with
A) a variable whose memory has been allocated
B) a copy of the value pointed to by the pointer variable
C) the actual value of the variable whose address is stored in the pointer variable
D) None of these
Q3) Not all arithmetic operations can be performed on pointers. For example, you cannot __________ or __________ pointers.
A) multiply, divide
B) +=, -=
C) add, subtract
D) increment, decrement
E) None of these
To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Characters, C-Strings, and More About the String Class
Available Study Resources on Quizplus for this Chatper
47 Verified Questions
47 Flashcards
Source URL: https://quizplus.com/quiz/27280
Sample Questions
Q1) If an uppercase character is passed as an argument to the toupper function, the result will be an uppercase character.
A)True
B)False
Q2) The function that reverses the order of a C-string is
A) reversstr
B) strrev
C) reverseit
D) back
E) None of these
Q3) In C++ a C-string is a sequence of characters stored in consecutive memory, terminated by a A) period
B) space
C) null character
D) semicolon
E) None of these
Q4) The ftoa function converts a floating-point value to an ASCII value.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: Structured Data
Available Study Resources on Quizplus for this Chatper
46 Verified Questions
46 Flashcards
Source URL: https://quizplus.com/quiz/27281
Sample Questions
Q1) You may use a pointer to a structure as a
A) function parameter
B) structure member
C) function return type
D) All of these
E) None of these
Q2) Data types that are created by the programmer are known as A) variables
B) abstract data types (ADTs)
C) functions
D) parameters
E) None of these
Q3) You cannot directly assign an enumerator to an int variable.
A)True
B)False
Q4) A struct can contain members with varying data types.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 13

Chapter 12: Advanced File Operations
Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/27282
Sample Questions
Q1) File output may be formatted the same way as console screen output.
A)True
B)False
Q2) All stream objects have __________ which indicate the position of the stream.
A) error state bits
B) condition statements
C) markers
D) intrinsic error messages
E) None of these
Q3) An alternative to using the open member function is to use the file stream object declaration itself to open the file. For example: fstream DataFile("names.dat", ios: : in | ios: : out);
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 14
Chapter 13: Introduction to Classes
Available Study Resources on Quizplus for this Chatper
54 Verified Questions
54 Flashcards
Source URL: https://quizplus.com/quiz/27283
Sample Questions
Q1) The following code shows an example of __________ class Point
{
Private:
Double y = 5.70;
Double z = 3.0;
Public:
Public member functions go here...
};
A) constructor delegation
B) in-place initialization
C) a default constructor creation
D) an illegal initialization
Q2) How many default constructors can a class have?
A) only one
B) two or more
C) only two
D) any number
E) None of these
To view all questions and flashcards with answers, click on the resource link above.

Page 15

Chapter 14: More About Classes
Available Study Resources on Quizplus for this Chatper
46 Verified Questions
46 Flashcards
Source URL: https://quizplus.com/quiz/27284
Sample Questions
Q1) If a member is declared __________, all objects of that class have access to that variable.
A) static
B) dynamic
C) inline
D) default
E) None of these
Q2) If you overload the prefix ++ operator, the postfix ++ operator is automatically overloaded.
A)True
B)False
Q3) A static member variable can be used when there are no objects of the class in existence.
A)True
B)False
Q4) A non-static member function may not access a static member variable.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 16

Chapter 15: Inheritance, Polymorphism, and Virtual Functions
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/27285
Sample Questions
Q1) A derived class may not have any classes derived from it.
A)True
B)False
Q2) Static binding occurs when the compiler binds a function call with the function call that resides in the same class as the call itself.
A)True
B)False
Q3) In C++11, using constructor inheritance, it is possible for any of the base class's constructors to be inherited.
A)True
B)False
Q4) A virtual function is declared by placing the __________ key word in front of the return type in the base class's function declaration.
A) virtual
B) private
C) public D) protected
E) None of these
To view all questions and flashcards with answers, click on the resource link above. Page 17

Chapter 16: Exceptions and Templates
Available Study Resources on Quizplus for this Chatper
36 Verified Questions
36 Flashcards
Source URL: https://quizplus.com/quiz/27286
Sample Questions
Q1) An actual instance of the function is created in memory when the compiler encounters
A) the template prefix
B) a call to the template function
C) a try block
D) a catch block
E) None of these
Q2) When an error occurs, an exception is
A) created
B) thrown
C) passed
D) ignored
E) None of these
Q3) Catch blocks serve as
A) exception handlers
B) receivers
C) temporary variables
D) permanent storage for trapped errors
E) None of these
To view all questions and flashcards with answers, click on the resource link above.
Page 18

Chapter 17: The Standard Template Library
Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/27287
Sample Questions
Q1) A sequence container organizes data in a sequential fashion, similar to an array.
A)True
B)False
Q2) Which of the following defines an array object that holds three strings?
A) array<int, 3> items = {blue, green, yellow}
B) array<strings, 4> items = {'blue', 'green', 'yellow',}
C) array<string, 4> items = {"blue", "green", "yellow"}
D) array<4> string items {"blue", "green", "yellow"}
E) None of these
Q3) The algorithms provided by the STL are implemented as __________ and perform various operations on elements of containers.
A) virtual functions
B) function templates
C) global variables
D) private data members
E) None of these
Q4) An iterator is a function that is used to access items in an array.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 19

Chapter 18: Linked Lists
Available Study Resources on Quizplus for this Chatper
41 Verified Questions
41 Flashcards
Source URL: https://quizplus.com/quiz/27288
Sample Questions
Q1) A new node cannot become the first node in the list.
A)True
B)False
Q2) The advantage a linked list has over a vector is that
A) a linked list can dynamically shrink or grow and a vector cannot
B) a linked list is smaller than a vector
C) a node can be inserted or removed faster from a linked list than from a vector
D) data removal and insertion are more accurate with a linked list than with a vector
E) None of these
Q3) The process of moving through a linked list is referred to as __________ the list.
A) cruising
B) traversing
C) hopping
D) revising
E) None of these
To view all questions and flashcards with answers, click on the resource link above.

Chapter 19: Stacks and Queues
Available Study Resources on Quizplus for this Chatper
47 Verified Questions
47 Flashcards
Source URL: https://quizplus.com/quiz/27289
Sample Questions
Q1) The __________ operation allows an item to be stored on a stack.
A) append
B) add
C) pop
D) push
E) None of these
Q2) A __________ is processed in a manner similar to customers standing in a grocery store check-out line where the first customer in line is the first to be served.
A) stack
B) vector
C) queue
D) All of these
E) None of these
Q3) A stack queue can be implemented as a A) circular array
B) stack
C) dynamic linked list
D) dynamic vector
E) None of these
To view all questions and flashcards with answers, click on the resource link above. Page 21

Chapter 20: Recursion
Available Study Resources on Quizplus for this Chatper
27 Verified Questions
27 Flashcards
Source URL: https://quizplus.com/quiz/27290
Sample Questions
Q1) When a recursive function directly calls itself, this is known as direct recursion.
A)True
B)False
Q2) Recursive algorithms are less efficient than iterative algorithms.
A)True
B)False
Q3) The speed and amount of memory available to modern computers diminishes the performance impact of recursion so much that inefficiency is no longer a strong argument against it.
A)True
B)False
Q4) All mathematical problems are designed to be more efficient using recursive solutions.
A)True
B)False
Q5) In a recursive solution, the base case is always the first case to be called.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 22

Chapter 21: Binary Trees
Available Study Resources on Quizplus for this Chatper
39 Verified Questions
39 Flashcards
Source URL: https://quizplus.com/quiz/27291
Sample Questions
Q1) Select all that apply. Which of the following are methods of traversing a binary tree?
A) LeftOrder traversal
B) PreOrder traversal
C) FrontOrder traversal
D) InOrder traversal
E) PostOrder traversal
Q2) The process of stepping through the nodes of a binary tree is known as A) climbing
B) traversing
C) stepping through
D) branching out
E) None of these
Q3) Select all that apply. Which of the following operations can be performed on a binary search tree?
A) moving
B) inserting
C) finding
D) placing
E) deleting
To view all questions and flashcards with answers, click on the resource link above.
Page 23