

![]()


Introduction to Programming is a foundational course designed to familiarize students with the basic concepts and techniques involved in computer programming. Students will learn the syntax and structure of a programming language, problem-solving strategies, and algorithm development. Key topics include data types, variables, control structures (such as loops and conditionals), functions, and basic input/output operations. Through hands-on exercises and projects, students will develop the skills necessary to design, write, and debug simple computer programs, equipping them for further study in computer science or related fields.
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) Once a value has been stored in a variable it cannot be changed.
A)True
B)False Answer: False
Q2) If a new value is stored in a variable, it replaces whatever value was previously there.
A)True
B)False Answer: True
Q3) Even when there is no power to the computer, data can be held in
A) a secondary storage device.
B) random accdss memory (RAM).
C) variables.
D) a computer program.
E) any of the above.
Answer: A
Q4) IDE stands for internal data engine.
A)True
B)False Answer: False
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) Every C++ program must have
A) comments.
B) variables.
C) literals.
D) a function called main..
E) all of the above.
Answer: D
Q2) Which of the following will cause the next output to begin on a new line?
A) cout << endl;
B) cout << "endl";
C) cout << "/n";
D) All of the above
E) A and C, but not B
Answer: A
Q3) The following two statements both assign the value 5 to the variable dept.
5 = dept; dept = 5;
A)True
B)False
Answer: False
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) To use the sqrt() function, or other mathematical library functions, you must #include the ________ header file in your program.
A) iostream
B) iomanip
C) cmath
D) algebra
E) mathlib
Answer: C
Q2) The cin object must be followed by
A) a single stream insertion (<<) operator.
B) one or more stream insertion operators (<<).
C) a single stream extraction (>>) operator.
D) one or more stream extraction (>>) operators.
E) no operators.
Answer: D
Q3) The cin object lets the user enter a string that contains embedded blanks.
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) What will the following statement do if x equals 17 and answer = 20?
Answer = x > 100 ?
0 : 1;
A) Assign 0 to answer.
B) Assign 0 to x.
C) Assign 1 to answer.
D) Assign 1 to x.
E) Assign 17 to answer.
Q2) The ________ operator takes an operand and reverses its truth or falsehood.
A) relational
B) &&
C) ||
D) !
E) !=
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

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29531
Sample Questions
Q1) A for statement contains three expressions: initialization, test, and A) repeat.
B) validate.
C) update.
D) quit.
E) increment.
Q2) To use an output file in a C++ program you must
A) make sure the file already exists.
B) create a file stream object that will "point to" (i.e. reference) the file.
C) open the file.
D) do all of the above.
E) do B and C, but not A.
Q3) To decrement a number means to increase its value.
A)True
B)False
Q4) Before beginning to add value to it, an accumulator should be initialized to 1.
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/29532
Sample Questions
Q1) A void function is one that
A) does nothing useful.
B) has an empty function body.
C) has no parameters.
D) returns no value.
E) returns a zero or null character.
Q2) In the following statement, what is 22.0?
Cout << sqrt(22.0);
A) A memory location.
B) A parameter.
C) An argument.
D) A default value.
E) An lvalue.
Q3) It is possible for a function to have some parameters with default arguments and some without.
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) An object is a(n) ________ of a class.
A) example
B) copy
C) instance
D) attribute
E) member
Q2) An Abstract data type (AD
T) is a programmer-defined data type that specifies the values the type can hold, the operations that can be performed on them, and how the operations will be implemented.
A)True
B)False
Q3) A constructor must have the same name as the
A) first private data member.
B) first public data member.
C) class.
D) first object of the class.
E) function return type.
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/29534
Sample Questions
Q1) 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
Q2) After carrying out the following two statements, sales will have been created as a one-dimensional array that can hold 20 double values. typedef salesArray double[20];
salesArray sales;
A)True
B)False
Q3) 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
To view all questions and flashcards with answers, click on the resource link above. Page 10

Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/29535
Sample Questions
Q1) The ________ search is adequate for searching through small arrays, but not through large ones.
A) binary
B) linear
C) selection
D) bubble
E) random
Q2) When sorting an array of objects, if the values in the data member being sorted on are out of order for two objects, those two data values should be swapped.
A)True
B)False
Q3) The linear search is adequate for searching through ________ arrays, but not through ________ ones.
A) int, double
B) char, string
C) ascending, descending
D) small, large
E) any regular, vector
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
62 Verified Questions
62 Flashcards
Source URL: https://quizplus.com/quiz/29518
Sample Questions
Q1) If a variable occupies more than one byte of memory, its address is
A) the address of the last byte of storage allocated to it.
B) the average of the addresses used to store the variable.
C) the address of the first byte of storage allocated to it.
D) general delivery.
E) None of the above
Q2) The expression s->m is meaningful only when s is a pointer to a structure and m is a member of the structure.
A)True
B)False
Q3) A pointer with the value 0 (zero) is called the NULL pointer.
A)True
B)False
Q4) Memory cannot be allocated after a program is already running.
A)True
B)False
Q5) It is legal to subtract a pointer variable from another pointer variable.
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) The ________ class destructor is called before the ________ class destructor.
A) base, derived
B) derived, base
C) public, private
D) private, public
E) None of the above
Q2) An ________ operator can work with programmer-defined data types.
A) inline
B) unconditional
C) overloaded
D) undefined
E) None of the above
Q3) An lvalue is
A) a value of type long.
B) a memory location that is associated with a name that can be used by different parts of the program to access the memory location.
C) An expression denoting a value that appears as the left operand of a binary operator.
D) a value of type long returned from a function.
E) None of the above

Page 13
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/29520
Sample Questions
Q1) The string class member function ________ returns the C-string value of the string object.
A) c_string(string s)
B) c_str(string s)
C) c_str()
D) c_string()
E) None of the above
Q2) By being able to pass arrays as arguments, you can write your own functions for processing C-strings.
A)True
B)False
Q3) The >> operator can be used to convert a value of type double to an equivalent string object stored in memory.
A)True
B)False
Q4) When using the strcat function, you must be careful not to overflow the bounds of the array allocated for the target string.
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) The state bit, ________, can be tested to see if the end of an input stream has been encountered.
A) ios::eof
B) ios::eofbit
C) ios::failbit
D) ios::badbit
E) None of the above
Q2) Outside of a C++ program, a file is identified by its ________. Inside a C++ program, a file is accessed through a ________.
A) file number, file name
B) file name, file number
C) name, address
D) name, file stream object
E) None of the above
Q3) The ________ may be used to write information to a file.
A) cout object
B) pen object
C) stream insertion operator <<
D) fileWrite() function
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 quicksort algorithm works on the basis of
A) three sublists.
B) two sublists and a pivot.
C) two pivots and a sublist.
D) three pivots.
E) None of the above
Q2) A recursive function should be designed to stop making recursive calls when it reaches its
A) return statement.
B) base case.
C) closing curly brace.
D) last parameter.
E) None of the above
Q3) When a recursive function directly calls itself, this is known as direct recursion.
A)True
B)False
Q4) Any algorithm that can be coded with recursion can also be coded using a loop.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 16

Available Study Resources on Quizplus for this Chatper
22 Verified Questions
22 Flashcards
Source URL: https://quizplus.com/quiz/29523
Sample Questions
Q1) A pure virtual function
A) is a virtual function that has been completely debugged.
B) is a virtual function that has no implementation.
C) is a virtual function that performs a single task in program.
D) is one that is only called from within a virtual constructor.
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) 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) The most important data structures in the STL are ________ and ________.
A) arrays, structs
B) lists, groups
C) containers, iterators
D) templates, prototypes
E) None of the above
Q2) The bad_alloc exception is thrown
A) when program code encounters a bad memory location.
B) by the new operator.
C) when you forget to free memory with the delete operator.
D) only when the program contains a catch block.
E) None of the above
Q3) If an exception is not caught, it is stored for later use.
A)True
B)False
Q4) The line containing a throw statement is known as the throw point.
A)True
B)False

Page 18
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/29525
Sample Questions
Q1) To build a linked list, we can
A) start with an empty list, and then form an array of nodes.
B) start with an empty list, and then perform a series of add item operations.
C) use the constructor to create an array of nodes.
D) call the list init function.
E) None of the above
Q2) In a non-empty list, there must be exactly one list item with no successor.
A)True
B)False
Q3) Moving through a linked list is referred to as ________ the list.
A) cruising
B) traversing
C) node-hopping
D) alternating
E) None of the above
Q4) Deleting an entire linked list requires a call to the delete operator for each node in the list.
A)True B)False
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 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
Q2) A stack that is implemented as a linked list is known as a deque.
A)True
B)False
Q3) A ________ stack or queue is implemented using linked lists.
A) dynamic
B) static
C) deque-based
D) floating point
E) None of the above
Q4) Enqueue and dequeue are the two most common stack operations.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 20

Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/29527
Sample Questions
Q1) A tree with a height of three must have A) six nodes.
B) one root and three nodes with two children each.
C) three levels.
D) three subtrees.
E) None of the above
Q2) When a binary tree is used to facilitate a search, it is referred to as a A) binary queue.
B) binary ordered deque.
C) binary search tree.
D) sort algorithm.
E) None of the above
Q3) One method of traversing a binary tree is A) inorder traversal.
B) preorder traversal.
C) postorder traversal.
D) All of the above
E) None of the above
To view all questions and flashcards with answers, click on the resource link above.
21