

Computer Science I
Exam Materials
Course Introduction
Computer Science I is an introductory course designed to provide students with a foundational understanding of computer science principles and programming concepts. This course covers topics such as algorithms, problem-solving strategies, variables, control structures, data types, functions, and basic data structures. Students will gain hands-on experience by writing, debugging, and testing code in a high-level programming language, often Python or Java. Emphasis is placed on developing logical reasoning, structured programming techniques, and computational thinking skills that serve as the basis for advanced study in computer science.
Recommended Textbook
Starting out with C++ Early Objects 9th Edition by Tony Gaddis
Available Study Resources on Quizplus
19 Chapters
766 Verified Questions
766 Flashcards
Source URL: https://quizplus.com/study-set/1486

Page 2

Chapter 1: Introduction to Computers and Programming
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29517
Sample Questions
Q1) The programmer usually enters source code into a computer using A) a preprocessor.
B) a compiler.
C) a linker.
D) a debugger.
E) none of the above.
Answer: E
Q2) A software package that includes a text editor, compiler, debugger, and assorted utilities for creating, testing, and running software is called
A) a low-level programming language.
B) a high-level programming language.
C) a software utility package (SUP).
D) an operating system.
E) none of the above.
Answer: E
Q3) Once a value has been stored in a variable it cannot be changed.
A)True
B)False
Answer: False
To view all questions and flashcards with answers, click on the resource link above.
Page 3

Chapter 2: Introduction to C Plus Plus
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29528
Sample Questions
Q1) The ________ is used to display information on the computer's screen.
A) < symbol
B) cin object
C) cout object
D) print object
E) output object
Answer: C
Q2) Which of the following is/are valid C++ identifiers?
A) June-2010
B) June.2010
C) June_2010
D) 2010June
E) Both C and D.
Answer: C
Q3) A variable of the char data type can hold a set of characters like "January".
A)True
B)False
Answer: False
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
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29529
Sample Questions
Q1) If the value of dollars is 5.0, the following statement will output 5.00 to the monitor: cout << fixed << showpoint << setprecision(4) << dollars << endl;
A)True
B)False
Answer: False
Q2) The following 4 lines of C++ code, use strings. string firstName; // Define a string object
Char lastName[7]; // Define a C-string
FirstName = "Abraham"; // Assign a value to the string object
LastName = "Lincoln"; // Assign a value to the C-string
Which of the following statements is /are True?
A) The string object is defined incorrectly because no size is given for it.
B) The 2 string definitions are correct, but the 2 assignment statements are wrong.
C) The string object is assigned a value correctly, but the C-string is not.
D) The C-string is assigned a value correctly, but the string object is not.
E) All 4 lines of code are correct.
Answer: C
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
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29530
Sample Questions
Q1) The ________ statement executes one statement, or block of statements, if a condition is True and skips it, doing nothing, if the condition is false.
A) if
B) if/else
C) if/else if
D) switch
E) if/endif
Q2) Which of the following correctly declares an enumerated data type named student?
A) enum student { Bill, Tom, Mary };
B) enum student { "Bill", "Tom", "Mary" };
C) int Bill = 1, Tom = 2, Mary = 3; enum student { 1, 2, 3 };
D) Any of the above 3 methods will work.
E) None of the above 3 methods will work.
Q3) logical operators AND and OR have a higher precedence than the NOT operator.
A)True
B)False
Q4) The scope of a variable is the program it is defined in.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 6
Chapter 5: Looping
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29531
Sample Questions
Q1) If a while loop has no braces around the body of the loop
A) there is no loop body.
B) the loop body ends when the endwhile statement is encountered.
C) the loop body contains just one statement.
D) the program will not compile.
E) the program will compile, but not run.
Q2) An initialization expression may be omitted from the for loop if no initialization is required.
A)True
B)False
Q3) To use files in a C++ program you must include the ________ header file.
A) file
B) iostream
C) fstream
D) Both A and B.
E) Both B and C.
Q4) A while loop may have a semicolon after the test expression and before the body of the loop, but it is not required.
A)True
B)False

Page 7
To view all questions and flashcards with answers, click on the resource link above.

Chapter 6: Functions
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29532
Sample Questions
Q1) A ________ variable is declared outside all functions.
A) local
B) global
C) static
D) counter
E) constant
Q2) One reason for using functions is to break programs into a set of manageable units, or modules.
A)True
B)False
Q3) Two or more functions may have the same name provided that
A) they do different things.
B) one has a prototype and the other doesn't.
C) their parameter lists are different.
D) their return types are different.
E) either C or D is True.
Q4) Although global variables can be useful, it is considered good programming practice to restrict your use of them.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 8

Chapter 7: Introduction to Classes and Objects
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29533
Sample Questions
Q1) A structure has member variables, like an object, but they are usually all public and accessed directly with the dot operator, instead of by calling member functions.
A)True
B)False
Q2) Accessors are sometimes called ________ functions and mutators are sometimes called ________ functions.
A) set, get
B) get, set
C) public, private
D) private, public
E) regular, inline
Q3) A class declaration creates an object.
A)True
B)False
Q4) A constructor is a public class function that is automatically invoked (i.e., called) whenever a class object is created.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 9

Chapter 8: Arrays
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29534
Sample Questions
Q1) To add up all the values in a two-dimensional array it would be best to use
A) one for loop
B) two separate for loops
C) a nested for loop
D) no loop
E) one sentinel controlled loop
Q2) When an array is passed to a function, it is actually ________ the array that is passed.
A) the starting memory address of
B) a copy of all the values in
C) the value stored in the first element of
D) the data type and size of
E) the data type and name of
Q3) If employee is an array of objects with a public member function named setHourlyWage, the following statement correctly calls this method for employee[2]. employee.setHourlyWage[2](20.00);
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.

Chapter 9: Searching, Sorting, Algorithm Analysis
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29535
Sample Questions
Q1) We can estimate the ________ of an algorithm by counting the number of basic steps it requires to solve a problem.
A) number of lines of code
B) efficiency
C) run time
D) code quality
E) result
Q2) To find a value that is in an unordered array of 50 items, how many values must linear search examine on average?
A) 1
B) 6
C) 25
D) 50
E) 51
Q3) If algorithm A requires 2n + 1 basic operations to process an input of size n, and Algorithm B requires 3n + 2 basic operations to process the same input, algorithms A and B are considered to be equally efficient.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Pointers
Available Study Resources on Quizplus for this Chatper
62 Verified Questions
62 Flashcards
Source URL: https://quizplus.com/quiz/29518
Sample Questions
Q1) When the less than ( < ) operator is used between two pointer variables, the expression is testing whether
A) the value pointed to by the first is less than the value pointed to by the second.
B) the value pointed to by the first is greater than the value pointed to by the second.
C) the address of the first variable comes before the address of the second variable in the computer's memory.
D) the first variable was declared before the second variable.
E) None of the above
Q2) Assuming that arr is an array identifier, the statement sum += *arr;
A) is illegal in C++.
B) will always result in a compiler error.
C) adds the value stored in arr[0] to sum.
D) adds the address of the pointer arr to sum.
E) None of the above
Q3) With pointer variables you can access, but you cannot modify, data in other variables.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 12
Chapter 11: More About Classes and Object-Oriented Programming
Available Study Resources on Quizplus for this Chatper
70 Verified Questions
70 Flashcards
Source URL: https://quizplus.com/quiz/29519
Sample Questions
Q1) The ________ operator may be used to assign one object to another.
A) =
B) ==
C) <>
D) &
E) None of the above
Q2) Protected members of a base class are like ________, with the exception that they may be accessed by derived classes.
A) constructor functions
B) static members
C) private members
D) public members
E) None of the above
Q3) C++ allows you to overload
A) compiler errors.
B) preprocessor directives.
C) operators and functions.
D) undefined variables.
E) None of the above

Page 13
To view all questions and flashcards with answers, click on the resource link above.

Chapter 12: More on C-Strings and the String Class
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29520
Sample Questions
Q1) The strcpy function's arguments are
A) two string class objects.
B) two pointers to char.
C) three pointers.
D) three arrays and one pointer.
E) None of the above
Q2) To declare an array that will store students' last names of up to 25 characters in length, which is an appropriate statement?
A) char lastName[25];
B) string lastName[25];
C) char lastName[26];
D) string lastName[24];
E) None of the above
Q3) After num = stoi("1000"); executes, what value is stored in the variable num?
A) 1000
B) 999 (1000 minus 1 for the null terminator)
C) "1000"
D) "thousand"
E) None of the above
To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 13: Advanced File and Io Operations
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29521
Sample Questions
Q1) The statement dataFile.close();
A) is illegal in C++.
B) needs a file name argument to execute correctly.
C) closes a file.
D) is legal but risks losing valuable data.
E) None of the above
Q2) To write to a binary file, you can use the write() member function of an ofstream object.
A)True
B)False
Q3) Only one file stream object can be declared per C++ program.
A)True
B)False
Q4) The ________ may be used to read information from a file.
A) cout object
B) the stream insertion operator
C) file.in macro
D) stream extraction operator
E) None of the above
To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Recursion
Available Study Resources on Quizplus for this Chatper
20 Verified Questions
20 Flashcards
Source URL: https://quizplus.com/quiz/29522
Sample Questions
Q1) Any algorithm that can be coded with recursion can also be coded using a loop.
A)True
B)False
Q2) When a recursive function directly calls itself, this is known as direct recursion.
A)True
B)False
Q3) The ________ algorithm uses recursion to sort an array.
A) shell sort
B) quicksort
C) binary sort
D) red/black sort
E) None of the above
Q4) A ________ function is one that calls itself.
A) dynamic
B) static
C) recursive
D) data validation
E) None of the above
To view all questions and flashcards with answers, click on the resource link above.
Page 16

Chapter 15: Polymorphism and Virtual Functions
Available Study Resources on Quizplus for this Chatper
22 Verified Questions
22 Flashcards
Source URL: https://quizplus.com/quiz/29523
Sample Questions
Q1) An abstract class is
A) one that has at least one pure virtual function.
B) one that supports polymorphism.
C) one that has all of its member functions declared private.
D) one that has all of its member variables declared private.
E) None of the above
Q2) ________ functions are dynamically bound by the compiler.
A) Constructor
B) Destructor
C) Static
D) Virtual
E) None of the above
Q3) Polymorphism is when ________ in a class hierarchy perform differently, depending upon the class of the object making the call.
A) base class constructors
B) derived class destructors
C) member functions
D) derived class constructors
E) None of the above
To view all questions and flashcards with answers, click on the resource link above. Page 17

Chapter 16: Exceptions, Templates, and the Standard
Template Library Stl
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29524
Sample Questions
Q1) An exception is a condition that can be caused by a syntax error in the program.
A)True
B)False
Q2) A(n)________ is a class that stores data and organizes it in some fashion.
A) iterator
B) container
C) template
D) box
E) None of the above
Q3) Types of iterators are
A) input and output.
B) forward and bidirectional.
C) random-access.
D) All of the above.
E) None of the above.
Q4) There is no difference between defining an object of an ordinary class and an object of a template class.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 18

Chapter 17: Linked Lists
Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/29525
Sample Questions
Q1) The defining characteristic of a linked list is that
A) data are stored in consecutive locations in the memory of the computer.
B) lists are very efficient at storing data.
C) the locations that store list data do not have to be consecutive in memory.
D) the maximum size of a list is fixed when the list is created.
E) None of the above
Q2) The list container provided by the Standard Template Library is a template version of a
A) singly-linked list.
B) doubly-linked list.
C) circular-linked list.
D) backward-linked list.
E) None of the above
Q3) Linked lists of items are commonly implemented by
A) using an array to hold list items.
B) using a function to compute the link to the next item.
C) using a class template to represent list items.
D) using a structure containing an item and a pointer to the structure type.
E) None of the above
To view all questions and flashcards with answers, click on the resource link above.
Page 19

Chapter 18: Stacks and Queues
Available Study Resources on Quizplus for this Chatper
36 Verified Questions
36 Flashcards
Source URL: https://quizplus.com/quiz/29526
Sample Questions
Q1) The programmer must declare in advance the size of a dynamic stack or queue.
A)True
B)False
Q2) In a dequeue operation, the element at the ________ of the queue is removed.
A) middle
B) front
C) declaration
D) mid-point
E) None of the above
Q3) The queue data structure is commonly applied in connection with
A) managing the order of print jobs.
B) communications software.
C) operating systems.
D) All of the above
E) None of the above
Q4) A real-world example of the queue data structure can be seen in a stack of cafeteria trays, where the last tray pushed onto the stack is the first tray removed.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 20

Chapter 19: Binary Trees
Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/29527
Sample Questions
Q1) A binary tree can be created using a structure containing a data value and A) a pointer to the first child node.
B) a pointer to the last child node.
C) two pointers, one for the left child and one for the right child.
D) two data nodes.
E) None of the above
Q2) Deleting a leaf node from a binary search tree is not difficult. Deleting a non-leaf node requires several steps.
A)True
B)False
Q3) A node that has no children is a A) root node.
B) head node.
C) leaf node.
D) pure binary node.
E) None of the above
Q4) Binary trees are commonly used to organize key values that index database records.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 21