

![]()


This course provides a foundational introduction to algorithmic thinking and computer programming. Students will learn to design, analyze, and implement algorithms for solving common computational problems, focusing on topics such as variables, control structures, data types, loops, functions, and basic data structures. Through hands-on programming assignments and projects, students will develop practical skills in writing efficient and reliable code, understand the principles of problem-solving, and gain familiarity with the syntax and features of a modern programming language. By the end of the course, students will be equipped with the essential tools and concepts needed to approach more advanced topics 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

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29517
Sample Questions
Q1) High-level programming languages include
A) C++ and Java.
B) C++ and JavaScript.
C) C++ and Visual Basic.
D) all of the above.
E) A and B, but not C.
Answer: D
Q2) Memory locations that can hold data are called
A) operators.
B) variables.
C) syntax.
D) operands.
E) none of the above.
Answer: B
Q3) Most of the lines in a program contain something meaningful; however, some of the lines may contain nothing at all.
A)True
B)False
Answer: True
To view all questions and flashcards with answers, click on the resource link above.
Page 3

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29528
Sample Questions
Q1) A variable of the char data type can hold a set of characters like "January".
A)True
B)False
Answer: False
Q2) What value will be assigned to the variable number by the following statement?
Int number = 7.8;
A) 7
B) 8
C) 7.8
D) None of the above.
E) It's unpredictable. That's the problem.
Answer: A
Q3) #include <iostream> is an example of a(n)
A) comment.
B) I/O statement.
C) preprocessor directive.
D) stream directive.
E) compiler option.
Answer: C
To view all questions and flashcards with answers, click on the resource link above.
Page 4
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29529
Sample Questions
Q1) 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
Q2) The following statement sets the value of total to -3. total -= 3;
A)True
B)False
Answer: False
To view all questions and flashcards with answers, click on the resource link above.

Page 5

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29530
Sample Questions
Q1) An expression in a C++ if statement that evaluates to 5, -5, or for that matter anything other than 0, is considered True.
A)True B)False
Q2) The following C++ test checks if the variable child is in the range 3 to 12. if (child >= 3 || child <= 12)
A)True B)False
Q3) The statement pass = (score >= 7) ?
True : false; does exactly the same thing as the if/else statement below: if (score >= 7) pass = True; else
pass = false;
A)True B)False
To view all questions and flashcards with answers, click on the resource link above.
6
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29531
Sample Questions
Q1) The ideal type of loop to use for repeating a menu is a(n) ________ loop.
A) do-while
B) for
C) sentinel controlled
D) infinite
E) nested
Q2) The statements in the body of a do-while loop are executed
A) only if the test condition is initially True.
B) at least once.
C) until the test condition becomes True.
D) until an exit statement is encountered.
E) forever until the user presses the break key.
Q3) A while loop is somewhat limited because the counter can only be incremented or decremented by one each time through the loop.
A)True
B)False
Q4) An initialization expression may be omitted from the for loop if no initialization is required.
A)True
B)False

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

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29532
Q1) A function ________ eliminates the need to place the function definition before all calls to the function.
A) header
B) prototype
C) argument
D) parameter
E) that is void
Q2) When you make a function call, the order of the arguments you send does not matter as long as the number of arguments matches the number of parameters the function has.
A)True
B)False
Q3) Functions are ideal for use in menu-drive programs. When a user selects a menu item, the program can call an appropriate function to carry out the user's choice.
A)True
B)False
Q4) In C++ global and local numeric variables are initialized to zero by default.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 8

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29533
Sample Questions
Q1) A destructor is a member function that A) is used to remove old unneeded objects.
B) causes the program to end.
C) is automatically called when an object is destroyed.
D) can only be called by the main function of a program.
E) None of the above.
Q2) Which of the following statements correctly creates an enumerated data type and defines an object of that type.
A) enum Season = {"Spring", "Summer", "Fall", "Winter"} favoriteSeason;
B) enum Season = {Spring, Summer, Fall, Winter}, Season favoriteSeason;
C) enum Season {Spring, Summer, Fall, Winter}, enum favoriteSeason;
D) ENUM Season {Spring, Summer, Fall, Winter} favoriteSeason;
E) None of these
Q3) The bundling of an object's data and functions together is called A) OOP.
B) encapsulation.
C) data hiding.
D) structuring.
E) private access.
To view all questions and flashcards with answers, click on the resource link above.
Page 9

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29534
Q1) An element of a two-dimensional array is referenced by the array name and two subscripts, first the element row number and then the element column number.
A)True
B)False
Q2) The amount of memory used by an array depends upon the array's data type and how many elements it can hold.
A)True
B)False
Q3) If a C++ program contains the following array definition int score[10]; the following statement would store 100 in the first array element: score[1] = 100;
A)True
B)False
Q4) When you create a vector it is unnecessary to specify how many elements it will hold because it will expand in size as you add new values to it.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29535
Sample Questions
Q1) A sorting algorithm can be used to arrange a set of ________ in ________ order. A) numeric values, ascending B) numeric values, descending C) strings, ascending D) strings, descending E) All of the above.
Q2) If a bubble sort is used to arrange the numbers 8 6 4 9 3 7 in ascending order, what order will the data be in after the first pass of the sort is completed?
A) 3 4 6 7 8 9
B) 3 6 4 9 8 7
C) 6 4 8 3 7 9
D) 6 8 4 9 3 7
E) None of the above
Q3) Bubble sort and selection sort can also be used with STL vectors.
A)True
B)False
Q4) A binary search requires that the elements be in order.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 11

Available Study Resources on Quizplus for this Chatper
62 Verified Questions
62 Flashcards
Source URL: https://quizplus.com/quiz/29518
Sample Questions
Q1) The statement Rectangle * boxPtr; defines a variable boxPtr to be a pointer pointing to a type Rectangle.
A)True
B)False
Q2) A reason for passing a pointer to a function is
A) to avoid the overhead of copying large data structures.
B) to allow the called function to modify a variable accessible to the calling function.
C) to allow easy access to data in the function that is being called.
D) A and B are both True.
E) None of the above
Q3) The ampersand (&) is used to dereference a pointer variable in C++.
A)True
B)False
Q4) It is possible for a structure to contain as a member a pointer to its own structure type.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 12

Available Study Resources on Quizplus for this Chatper
70 Verified Questions
70 Flashcards
Source URL: https://quizplus.com/quiz/29519
Sample Questions
Q1) In an inheritance situation, you can't pass arguments to a base class constructor.
A)True
B)False
Q2) The library function move() can be used to
A) transfer ownership of a managed object from one unique_ptr object to another.
B) move the contents of a dynamically allocated block of memory to another address. C) move the contents of any block of memory to another address.
D) make a raw pointer point to a different memory location.
Q3) A ________ function is not a member of a class, but it has access to the private members of the class.
A) static
B) constructor
C) destructor
D) friend
E) None of the above
Q4) The this pointer is automatically passed to static member functions of a class. A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 13

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29520
Sample Questions
Q1) If str is a string class object, the member function str.length() returns
A) the number of characters that make up the str string object.
B) the same value as the member function str.size().
C) the number of integer variables that make up the str object.
D) Both A and B are correct.
E) Both A and C are correct.
Q2) To declare a C-string, you should use the type expression string *.
A)True
B)False
Q3) Assume that str1 and str2 are variables of type C-string. The proper expression to use when comparing them for equality is
A) str1 = str2.
B) str1 == str2.
C) strcmp(str1, str2) == 0.
D) str1.compare(str2).
E) None of the above
Q4) A C-string can be assigned to a variable whose type is the string class.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 14

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29521
Sample Questions
Q1) A file must be ________ before data can be written to or read from it.
A) closed
B) opened
C) declared
D) initialized
E) None of the above
Q2) The ________ function can be used to store binary data to a file.
A) binary.out
B) write
C) put
D) dataout(binary)
E) None of the above
Q3) The ________ data type can be used to connect to files and read information from them into memory.
A) ofstream
B) istream
C) ifstream
D) instream
E) None of the above
To view all questions and flashcards with answers, click on the resource link above.
Page 15
Available Study Resources on Quizplus for this Chatper
20 Verified Questions
20 Flashcards
Source URL: https://quizplus.com/quiz/29522
Sample Questions
Q1) The speed and amount of memory available to modern computers diminishes the performance impact of the overhead of recursion so much that for many applications, this overhead is not noticeable.
A)True
B)False
Q2) The base case of a recursive function
A) is 0.
B) is 1.
C) is depth / 2.
D) is 1 / (depth * 3.1415).
E) depends on the problem being solved.
Q3) The quicksort algorithm can be used to
A) sort lists stored in arrays.
B) perform binary search on arrays.
C) quickly sort and search arrays.
D) All of the above
E) None of the above
Q4) Any algorithm that can be coded with recursion can also be coded using a loop. A)True
B)False

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

Available Study Resources on Quizplus for this Chatper
22 Verified Questions
22 Flashcards
Source URL: https://quizplus.com/quiz/29523
Sample Questions
Q1) The term ________ means the ability to take many forms.
A) inheritance
B) polymorphism
C) member function
D) encapsulation
E) None of the above
Q2) 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
Q3) A pure virtual function
A) must be overridden in a derived class for the function to be useful.
B) executes more efficiently than a non-pure virtual function.
C) must be accompanied by a virtual constructor of the same class.
D) All of the above
E) None of the above
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29524
Sample Questions
Q1) A function template's prefix contains ________ in angled brackets.
A) one or more generic data types
B) the function definition
C) constant values
D) the function's return type
E) None of the above
Q2) A(n) ________ is like a pointer. It is used to access the individual data elements in a container.
A) element access operator
B) subscript indicator
C) global data finder
D) iterator
E) None of the above
Q3) Two types of container classes in the STL are
A) sequential and associative.
B) box and cylinder.
C) array and struct.
D) constant and literal.
E) None of the above
To view all questions and flashcards with answers, click on the resource link above. Page 18

Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/29525
Sample Questions
Q1) Adding a new node in the middle or at the end of a singly-linked list requires a pointer to the node after which the new node will be added.
A)True
B)False
Q2) When you delete a node from a linked list, you must ensure that the links in the surrounding nodes are set to bypass the node being deleted.
A)True
B)False
Q3) Deleting an entire linked list requires a call to the delete operator for each node in the list.
A)True
B)False
Q4) 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
To view all questions and flashcards with answers, click on the resource link above. Page 19

Available Study Resources on Quizplus for this Chatper
36 Verified Questions
36 Flashcards
Source URL: https://quizplus.com/quiz/29526
Sample Questions
Q1) A dynamic queue can be implemented as a
A) dynamic linked list.
B) fixed-length array.
C) fixed-length circular array.
D) All of the above
E) None of the above
Q2) A dynamic stack has a ________ size, and is implemented as a(n) ________.
A) variable, linked list
B) fixed, linked list
C) variable, array
D) fixed, array
E) None of the above
Q3) Two primary queue operations are
A) push and pop.
B) enqueue and dequeue.
C) insert and delete.
D) onqueue and offqueue.
E) None of the above
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/29527
Sample Questions
Q1) The preorder method of traversing a binary tree involves processing the root node's data, traversing the left subtree, and then traversing the right subtree.
A)True
B)False
Q2) The main difference between a binary tree and a linked list is that
A) a linked list can be empty, but a binary tree cannot.
B) a binary tree can be empty, but a linked list cannot.
C) nodes in a binary tree have two successors instead of one.
D) recursion is useful on binary trees, but not on linked lists.
E) None of the above
Q3) The inorder method of traversing a binary tree involves traversing the left subtree, processing the data in the root, and then traversing the right subtree.
A)True
B)False
Q4) In certain types of binary trees, the number of leaves can be greater than the number of nodes.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 21