

![]()


Introduction to C++ provides students with a foundational understanding of the C++ programming language, focusing on essential concepts such as data types, control structures, functions, arrays, pointers, and object-oriented programming. The course combines theoretical instruction with hands-on programming exercises to develop problem-solving skills and proficiency in writing, testing, and debugging C++ programs. By the end of the course, students will be able to design and implement basic software applications using C++, laying the groundwork for more advanced study in computer science and software engineering.
Recommended Textbook C++ Programming Program Design Including Data Structures 6th Edition by D.S. Malik
Available Study Resources on Quizplus
21 Chapters
1050 Verified Questions
1050 Flashcards
Source URL: https://quizplus.com/study-set/319 Page 2
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128444
Sample Questions
Q1) The devices that the computer uses to display results are called ____ devices. A) exit
B) entry
C) output
D) input
Answer: C
Q2) The programming language C++ evolved from ____.
A) BASIC
B) assembly
C) C
D) C+
Answer: C
Q3) A program called a(n)____________________ translates the assembly language instructions into machine language.
Answer: assembler
Q4) Word processors,spreadsheets,and games are examples of ____________________.
Answer: application programs applications

Page 3
Q5) The ASCII data set consists of ____________________ characters. Answer: 128
To view all questions and flashcards with answers, click on the resource link above.
Page 4
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5305
Sample Questions
Q1) In a C++ program,one and two are double variables and input values are 10.5 and 30.6.After the statement cin >> one >> two; executes,____.
A) one = 10.5, two = 10.5
B) one = 10.5, two = 30.6
C) one = 30.6, two = 30.6
D) one = 11, two = 31
Answer: B
Q2) A comma is also called a statement terminator.
A)True
B)False
Answer: False
Q3) The expression static_cast<int>(9.9)evaluates to ____.
A) 9
B) 10
C) 9.9
D) 9.0
Answer: A
Q4) A(n)____________________ is a memory location whose contents can be changed.
Answer: variable

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

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5306
Sample Questions
Q1) When you want to process only partial data,you can use the stream function ____ to discard a portion of the input.
A) clear
B) skip
C) delete
D) ignore
Answer: D
Q2) The functions get,ignore,and so on are members of the data type
Answer: istream
Q3) It is a good idea to redefine cin and cout in your programs.
A)True
B)False
Answer: False
Q4) C++ comes with a wealth of functions,called ____________________ functions,that are written by other programmers.
Answer: predefined pre defined pre-defined
To view all questions and flashcards with answers, click on the resource link above. Page 6

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5307
Sample Questions
Q1) In C++,both ! and != are relational operators.
A)True
B)False
Q2) Which of the following is the "not equal to" relational operator?
A) !
B) |
C) !=
D) &
Q3) Which of the following operators has the highest precedence?
A) !
B) *
C) %
D) =
Q4) Every else must be paired with a(n)____________________.
Q5) Suppose x is 5 and y is 7.Choose the value of the following expression: (x != 7)&& (x <= y)
A) false
B) true
C) 0
D) null
To view all questions and flashcards with answers, click on the resource link above. Page 7

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128467
Sample Questions
Q1) Consider the following code.(Assume that all variables are properly declared.) cin >> ch; While (cin)
{ \(\quad\)cout << ch; \(\quad\)cin >> ch; }
This code is an example of a(n)____ while loop.
A) sentinel-controlled
B) flag-controlled
C) EOF-controlled
D) counter-controlled
Q2) The statement in the body of a while loop acts as a decision maker.
A)True
B)False
Q3) To generate a random number,you can use the function rand of the header file
Q4) The ____________________ loop has an exit condition but no entry condition.
Q5) A loop ____________________ is a set of statements that remains true each time the loop body is executed.
8
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5309
Sample Questions
Q1) A variable or expression listed in a call to a function is called the ____.
A) formal parameter
B) actual parameter
C) data type
D) type of the function
Q2) Assume the following. static_cast<int>('a')= 97
Static_cast<int>('A')= 65
The output of the statement:
Cout << static_cast<int>(tolower('B'))<< endl; is ____.
A) 65
B) 67
C) 96
D) 98
Q3) When you attach & after the dataType in the formal parameter list of a function,the variable following that dataType becomes a(n)____________________ parameter.
Q4) A function ____________________ is a function that is not fully coded.
Q5) A(n)____________________ parameter is a formal parameter that receives the location (memory address)of the corresponding actual parameter.
Q6) In C++,:: is called the ____________________.
Page 9
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5310
Sample Questions
Q1) The data type string has a named constant,____,associated with it.
A) string::size
B) string::size_type
C) string::pos
D) string::npos
Q2) Suppose that you have the following declaration. enum cars {FORD,GM,TOYOTA,HONDA};
Cars domesticCars = FORD; The statement: DomesticCars = static_cast<cars>(domesticCars + 1);
Sets the value of domesticCars to ____.
A) FORD
B) GM
C) TOYOTA
D) HONDA
Q3) The following is a legal C++ enumeration type: enum colorType {BLUE,GREEN,PINK,YELLOW,RED};
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 10
Q4) The values in the domain of an enumeration type are called

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5311
Sample Questions
Q1) The following statements store the value ____________________ into len. int len; len = strlen("Sunny California");
Q2) What is the output of the following C++ code? int list[5] = {0,5,10,15,20}; Int j;
For (j = 1; j <= 5; j++) \(\quad\)Cout << list[j] << " "; Cout << endl;
A) 0 5 10 15 20
B) 5 10 15 20 0
C) 5 10 15 20 20
D) Code results in index out-of-bounds
Q3) Complete the following statement so that it outputs the array sales. double sales[10]; int index; for (index = 0; index < 10; index++) cout << ____________________ << " ";
Q4) In the following declaration,the array gamma has ____________________ components. int gamma[5][6][10];
Page 11
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5312
Sample Questions
Q1) To compare struct variables,you compare them ____.
A) by reference
B) by value
C) index-wise
D) member-wise
Q2) If a variable is passed by ____________________,then when the formal parameter changes,the actual parameter also changes.
Q3) In structs,you access a component by using the struct name together with the relative position of the component.
A)True
B)False
Q4) Consider the following function prototype: int seqSearch(const listType& list,int searchItem);
The actual parameter cannot be modified by ____.
A) seqSearch
B) listType
C) list
D) searchItem
Q5) Both arrays and structs are examples of ____________________ data types.
To view all questions and flashcards with answers, click on the resource link above. Page 12

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128469
Sample Questions
Q1) A(n)____________________ is a statement specifying what is true after the function call is completed.
Q2) In C++ terminology,a class object is the same as a class instance.
A)True
B)False
Q3) A class object can be ____.That is,it is created each time the control reaches its declaration,and destroyed when the control exits the surrounding block.
A) static
B) automatic
C) local
D) public
Q4) In C++,the ____ is an operator called the member access operator. A) . B) , C) :: D) #
Q5) By default,all members of a class are ____________________.
Q6) A program or software that uses and manipulates the objects of a class is called a(n)____________________ of that class.
Page 13
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5314
Sample Questions
Q1) Existing classes,from which you create new classes,are called ____ classes.
A) child
B) base
C) sibling
D) derived
Q2) A call to the base class's constructor is specified in the heading of the definition of a derived class constructor.
A)True
B)False
Q3) ____ is a "has-a" relationship.
A) Inheritance
B) Encapsulation
C) Composition
D) Polymorphism
Q4) If inheritance is private,all members of the base class,including private members,become private members of the derived class.
A)True
B)False
Q5) In ____________________,the derived class is derived from a single base class.
To view all questions and flashcards with answers, click on the resource link above. Page 14
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5315
Sample Questions
Q1) Which of the following would be appropriate syntax for the heading of a copy constructor for a class called rulerType?
A) rulerType(int inches, int centimeters)
B) rulerType()
C) rulerType(const rulerType& myRuler)
D) copy rulerType(int inches, int centimeters)
Q2) A class ____ automatically executes whenever a class object goes out of scope.
A) constructor
B) destructor
C) pointer
D) exception
Q3) A pointer variable is a variable whose content is a memory address.
A)True
B)False
Q4) In a ____ copy,two or more pointers of the same type point to the same memory.
A) static
B) shallow
C) dynamic
D) deep
Q5) The binding of
time.

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

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5316
Sample Questions
Q1) Any function that overloads an operator is called a(n)____________________ function.
Q2) The operator function that overloads the insertion operator,<<,or the extraction operator,>>,for a class must be a(n)____________________ function of that class.
Q3) The declaration of a friend function cannot be placed within the private part of the class.
A)True
B)False
Q4) The ____________________ operator causes a member-wise copy of the member variables of the class.
Q5) To overload the pre-increment (++)operator for a class,if the operator function is a member of that class,it must have ____ parameter(s).
A) no
B) one
C) two
D) three
Q6) The ____________________ members of a class are local to the class and,therefore,cannot be accessed outside of the class.
To view all questions and flashcards with answers, click on the resource link above. Page 17

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5317
Sample Questions
Q1) When an exception is thrown in a function,the function-call stack is ____ so that the exception can be caught in the next try/catch block.
A) destroyed
B) allocated
C) unbound
D) unwound
Q2) The class ____________________ contains the function what.
Q3) If the catch block with an ellipses (in the heading)is needed,then it should be the first catch block in a sequence of try/catch blocks.
A)True
B)False
Q4) When an exception is thrown,if the program does not handle the exception,then the function ____ is called to terminate the program.
A) log
B) what
C) terminate
D) close
Q5) The string concatenation operator is ____________________.
To view all questions and flashcards with answers, click on the resource link above.
Page 18

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5318
Sample Questions
Q1) In a recursive function,the base case stops the recursion.
A)True
B)False
Q2) If a function A calls function B and function B calls function A,then function A is ____________________ recursive.
Q3) The language of a computer,called ____________________ language,is a series of 0s and 1s.
Q4) Tracing through ____ recursion is more tedious than tracing other recursive forms.
A) direct
B) indirect
C) tail
D) iterative
Q5) Consider the accompanying definition of a recursive function.What is the output of the following statement? cout << recFunc(8)<< endl;
A) 4
B) 8
C) 72
D) 720
To view all questions and flashcards with answers, click on the resource link above. Page 19

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5319
Sample Questions
Q1) Consider the following code: template <class Type> Int doublyLinkedList<Type>::length()const
{ } The statement that provides the length of the linked list is ____.
A) cout <<< count;
B) destroy();
C) return count;
D) return next;
Q2) When you build a linked list in the backward manner,a new node is always inserted at the end of the linked list.
A)True
B)False
Q3) The ____________________ constructor can make an identical copy of a linked list.
Q4) A(n)____________________ linked list is a linked list in which every node has a next pointer and a back pointer.
Q5) In C++,the dereferencing operator is represented by the ____________________ symbol.
To view all questions and flashcards with answers, click on the resource link above.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5320
Sample Questions
Q1) The postfix expression 14 2 5 + = will generate an error,because ____.
A) it contains an illegal operator
B) it does not have enough operands
C) it has too many operators
D) there will be too many elements in the stack when the equal sign is encountered
Q2) The postfix expression 3 5 + 2 ; 6 - = will generate an error,because it ____.
A) contains an illegal operator
B) does not have enough operands
C) has too many operands
D) has too many operators
Q3) In the array representation of a stack,the stack is initialized simply by setting stackTop to ____________________.
Q4) The expression (a - b)* (c + d)is equivalent to which of the following postfix expressions?
A) a b c d - + *
B) a b - c d + *
C) a b - + c d *
D) - + * a b c d
Q5) An array is a(n)____________________ access data structure.
To view all questions and flashcards with answers, click on the resource link above. Page 21

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5321
Sample Questions
Q1) In a quick sort,all of the sorting work is done by the function
Q2) During the sorting phase of insertion sort,the array containing the list is divided into two sublists,sorted and unsorted.
A)True
B)False
Q3) Consider the following list: int list[] = {4,8,19,25,34,39,45,48,66,75,89,95}
When performing a binary search,the target is first compared with ____.
A) 4
B) 25
C) 39
D) 95
Q4) To construct a search algorithm of the order less than log<sub>2</sub>n,it cannot be ____________________ based.
Q5) The first step in the quick sort partition algorithm is to determine the ____________________ and swap it with the first element in the list.
Q6) The ____________________ search algorithm is the optimal worst-case algorithm for solving search problems by using the comparison method.
To view all questions and flashcards with answers, click on the resource link above. Page 22

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5322
Sample Questions
Q1) In a binary search tree,the data in each node is ____ the data in the right child. A) equal to B) smaller than C) greater than D) smaller or equal to
Q2) In a binary search tree,the data in each node is ____ the data in the left child. A) larger than B) smaller than C) equal to D) larger or equal to
Q3) When traversing a binary tree with the pointer current,the pointer current is initialized to ____.
A) NULL
B) llink
C) rlink
D) root
Q4) The ____________________ of a binary tree is the number of nodes on the longest path from the root to a leaf.
To view all questions and flashcards with answers, click on the resource link above.
Page 23

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5323
Sample Questions
Q1) If the elements of E(G)are ordered pairs,G is called a(n)____ graph.
A) undirected
B) directed
C) weighted D) spanning
Q2) In a graph G,if the edges connecting two vertices have weights assigned to them,the graph is called a ____ graph.
A) source
B) weighted C) spanning D) minimal
Q3) A graph H is called a(n)____ of G if V(H)is a subset of V(G)and E(H)is a subset of E(G); that is,every vertex of H is a vertex of G,and every edge in H is an edge in G.
A) matrix
B) intersection
C) subgraph
D) union
Q4) A(n)____________________ ordering of the vertices of the accompanying graph is 0,1,3,4,2,5,7,8,6,9.
To view all questions and flashcards with answers, click on the resource link above. Page 24

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5324
Sample Questions
Q1) The ____________________ iterator is used to input data into a program from an input stream.
Q2) The deq.front()operation on a deque object checks whether the container is empty.
A)True
B)False
Q3) ____________________ predicates check a specific property for a single argument.
Q4) The only difference between the containers set and multiset is that the container multiset allows ____________________.
Q5) A function object contains a function that can be treated as a function using the ____ operator.
A) *
B) ::
C) ()
D) .
Q6) If the data needs to be processed in a(n)____ manner,use a queue.
A) FILO
B) LILO
C) LIFO
D) FIFO
To view all questions and flashcards with answers, click on the resource link above. Page 25