

![]()


This course offers an intensive introduction to programming using C++, designed for students with previous experience in programming. Topics include advanced data types, object-oriented programming principles, memory management, templates, and the Standard Template Library (STL). Students will develop the skills needed to design, write, and debug efficient C++ programs, while exploring concepts such as inheritance, polymorphism, exception handling, and file input/output. By the end of the course, participants will be able to construct robust and efficient applications, preparing them for further study or professional work in software development.
Recommended Textbook C++ Programming From Problem Analysis to Program Design 6th Edition by D.S. Malik
Available Study Resources on Quizplus
18 Chapters
899 Verified Questions
899 Flashcards
Source URL: https://quizplus.com/study-set/1103 Page 2

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128446
Sample Questions
Q1) The programming language C++ evolved from ____.
A) BASIC
B) assembly
C) C
D) C+
Answer: C
Q2) To develop a program to solve a problem, you start by analyzing the problem.
A)True
B)False
Answer: True
Q3) A program called a(n) ____________________ translates the assembly language instructions into machine language.
Answer: assembler
Q4) Assembly language uses easy-to-remember instructions called ____________________.
Answer: mnemonics
Q5) In a C++ program, statements that begin with the symbol # are called ____________________ directives.
Answer: preprocessor
To view all questions and flashcards with answers, click on the resource link above. Page 3

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21709
Sample Questions
Q1) In C++, reserved words are the same as predefined identifiers.
A)True
B)False
Answer: False
Q2) If a C++ arithmetic expression has no parentheses, operators are evaluated from left to right.
A)True
B)False
Answer: True
Q3) The maximum number of significant digits in values of the double type is 15.
A)True
B)False
Answer: True
Q4) The maximum number of significant digits in float values is up to 6 or 7.
A)True
B)False
Answer: True
Q5) A(n) ____________________ is a sequence of zero or more characters. Answer: string
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/21710
Sample Questions
Q1) Suppose that ch1 and ch2 are char variables and the input is: WXYZ
What is the value of ch2 after the following statements execute?
Cin >> ch1;
Ch2 = cin.peek();
Cin >> ch2;
A) W
B) X
C) Y
D) Z
Answer: B
Q2) In the C++ statement, cin.get(u);
u must be a variable of type ____________________.
Answer: char
Q3) In the statement cin >> x;, x can be a variable or an expression.
A)True
B)False
Answer: False
Q4) In C++, the dot is an operator called the ____________________operator.
Answer: member access
To view all questions and flashcards with answers, click on the resource link above. Page 5

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21711
Sample Questions
Q1) Suppose P and Q are logical expressions. The logical expression P && Q is true if both P and Q are true.
A)True
B)False
Q2) The value of the expression 6 < 5 || 'g' > 'a' && 7 < 4 is ____________________.
Q3) The expression in an if statement is sometimes called a(n) ____.
A) selection statement
B) action statement
C) decision maker
D) action maker
Q4) If the expression in an assert statement evaluates to true, the program terminates. A)True
B)False
Q5) A(n) ____________________ structure does not require the evaluation of a logical expression.
Q6) Every else must be paired with a(n) ____________________.
Q7) The symbol > is a(n) ____________________ operator.
To view all questions and flashcards with answers, click on the resource link above. Page 6
Q8) In C++, the logical operator AND is represented by ____________________.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21712
Sample Questions
Q1) What is the output of the following C++ code? count = 1; num = 25; while (count < 25)
{ num = num - 1; \(\quad\)count++;
cout << count << " " << num << endl;
A) 24 0
B) 24 1
C) 25 0
D) 25 1
Q2) In ____ structures, the computer repeats particular statements a certain number of times depending on some condition(s).
A) looping
B) branching
C) selection
D) sequence
Q3) The function srand takes as input a(n) ____________________ int, which acts as the seed for the algorithm.
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/21713
Sample Questions
Q1) A variable for which memory remains allocated as long as the program executes is called a(n) ____________________ variable.
Q2) If a function needs to return more than one value, as a rule of good programming style, you should change it to a(n) ____________________ function and use the appropriate reference parameters to return the values.
Q3) A function prototype is ____.
A) a definition, but not a declaration
B) a declaration and a definition
C) a declaration, but not a definition
D) a comment line
Q4) Once you write and properly debug a function, you can use it in the program (or different programs) again and again without having to rewrite the same code repeatedly.
A)True
B)False
Q5) ____________________ identifiers are not accessible outside of the function (block).
Q6) Stream variables (for example, ifstream and ofstream) should be passed by ____________________ to a function.
Page 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/21714
Sample Questions
Q1) The scope of a namespace member is local to the ____. A) function
B) block
C) file
D) namespace
Q2) The following is a legal C++ enumeration type: enum colorType {BLUE, GREEN, PINK, YELLOW, RED};
A)True
B)False
Q3) The values in the domain of an enumeration type are called
Q4) Considering the statement string str = "Gone with the wind";, the output of the statement cout << str.find("the") << endl; is ____.
A) 9
B) 10
C) 11
D) 12
Q5) Suppose str = "abcd"; After the statement str[1] = 'A'; The value of str is "____________________".
Q6) The data type string has a named constant, ____________________, associated with it. Page 9
To view all questions and flashcards with answers, click on the resource link above.
Page 10

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21716
Sample Questions
Q1) You can declare struct variables when you define a struct.
A)True
B)False
Q2) The contents of a struct variable must be written one member at a time. A)True B)False
Q3) The following statement defines a struct houseType with a total of ____________________ member(s).
struct houseType
{ string style;
\(\quad\)int numOfBedrooms;
\(\quad\)int numOfBathrooms;
\(\quad\)int numOfCarsGarage; \(\quad\)int yearBuilt;
};
Q4) A(n) ____________________ is a set of elements of the same type.
Q5) A function can return a value of the type struct. 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
49 Verified Questions
49 Flashcards
Source URL: https://quizplus.com/quiz/21717
Sample Questions
Q1) A class and its members can be described graphically using a notation known as the ____ notation.
A) OON
B) OOD
C) UML
D) OOP
Q2) To guarantee that the member variables of a class are initialized, you use ____.
A) accessors
B) mutators
C) constructors
D) destructor
Q3) Consider the UML class diagram shown in the accompanying figure. According to the UML class diagram, how many private members are in the class?
A) none
B) zero
C) two
D) three
Q4) A constructor with no parameters is called the ____________________ constructor.
Q5) By default, all members of a class are ____________________.
To view all questions and flashcards with answers, click on the resource link above. Page 13

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21718
Sample Questions
Q1) Classes can create new classes from existing classes. This important feature ____.
A) encourages code reuse
B) aids the separation of data and operations
C) provides public access to the internal state of an object
D) results in more software complexity
Q2) Objects are created when ____________________ variables are declared.
Q3) In the case of composition, the ____________________ name is used to invoke the constructor.
Q4) Which of the following is true about inheritance?
A) All public member functions of the base class become the public member functions of the derived class.
B) All public member variables of the base class become the public member variables of the derived class.
C) All public members of the base class become the public members of the derived class.
D) The public member variables of the base class become the public or private member variables of the derived class.
Q5) To define new classes in C++, you create new ____________________ files.
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/21719
Sample Questions
Q1) Consider the following statements: void pointerParameters(int* &p, double *q)
{ . . }
In the function pointerParameters, the parameter q is a(n) ____________________ parameter.
Q2) The statement that declares board to be an array of six pointers wherein each pointer is of type int is: int ____________________;
Q3) A class ____ automatically executes whenever a class object goes out of scope.
A) constructor
B) destructor
C) pointer
D) exception
Q4) The copy constructor automatically executes when the return value of a function is a(n) ____________________.
To view all questions and flashcards with answers, click on the resource link above. Page 15
Q5) The binding of virtual functions occurs at program ____________________ time.

Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21720
Sample Questions
Q1) In C++, a function ____________________ can be overloaded.
Q2) The general syntax to overload the stream extraction operator >> for a class is ____.
A) istream& operator>>(istream&, className&);
B) const istream& operator>>(istream&, className&);
C) friend operator>>(istream&, className&);
D) friend istream& operator>>(istream&, className&);
Q3) The return type of the function to overload the operator >> must be a reference to a(n) ____ object.
A) iostream
B) ostream
C) stream
D) istream
Q4) When writing the definition of a friend function, the name of the class and the scope resolution operator precede the name of the friend function in the function heading.
A)True
B)False
Q5) Any function that overloads an operator is called a(n) ____________________ function.
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/21721
Sample Questions
Q1) If you want to include members in your exception class, you typically include the function ____.
A) that
B) this
C) log
D) what
Q2) If the operator new cannot allocate memory space, this operator throws a(n) ____________________ exception.
Q3) Which of the following is a valid C++ statement?
A) assert(0 = divisor);
B) assert(divisor != 0);
C) assert(divisor 0);
D) assert(divisor is 0);
Q4) When an exception occurs in a try block, control immediately passes to one of the ____________________ blocks.
Q5) An object that is being thrown cannot be an anonymous object.
A)True B)False
Q6) The string concatenation operator is represented by the ____________________ symbol.
Page 17
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/21722
Sample Questions
Q1) Consider the accompanying definition of a recursive function. What is the output of the following statement? cout << puzzle(3, 7) << endl;
A) 10
B) 21
C) 42
D) 420
Q2) Tracing through ____ recursion is more tedious than tracing other recursive forms.
A) direct
B) indirect
C) tail
D) iterative
Q3) Infinite recursions execute forever on a computer.
A)True
B)False
Q4) Suppose that function A calls function B, function B calls function C, function C calls function D, and function D calls function A. Function A is then ____________________ recursive.
Q5) The rightmost bit of the binary representation of 33 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/21723
Sample Questions
Q1) The type vector provides the function ____________________, which returns the first element in the vector object.
Q2) Assuming that list consists of the following elements, what is the result after bubble sort completes? int list[] = {2, 56, 34, 25, 73, 46, 89, 10, 5, 16};
A) 89 73 56 46 34 25 16 10 5 2
B) 2 56 34 25 5 16 89 46 73
C) 2 5 10 16 25 34 46 56 73 89
D) 2 10 16 25 34 46 56 73 89
Q3) The type vector provides the expression ____________________, which inserts a copy of elem into vecList at the end.
Q4) With the binary search algorithm, ____ key comparison(s) is/are made in the successful case-the last time through the loop.
A) one
B) two
C) n-2
D) n
Q5) The type vector provides the expression ____________________, which deletes the last element of vecList.
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/21724
Sample Questions
Q1) What is the purpose of the following code? current = head; While (current != NULL)
{ //Process current Current = current->link;
}
A) Insertion of a node
B) Selection of a node
C) Traversal of a linked list
D) Creation of a new list
Q2) You can use the pointer head of a linked list to traverse the list. A)True
B)False
Q3) The ____________________ constructor can make an identical copy of a linked list.
Q4) In C++, the dereferencing operator is ____________________.
Q5) Each node of a linked list must store the data as well as the ____________________ for the next node in the list
Q6) A(n) ____________________ is an object that produces each element of a container, such as a linked list, one element at a time.
Page 20
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/21725
Sample Questions
Q1) The bottom element of the stack is the last element added to the stack.
A)True
B)False
Q2) In evaluating a postfix expression, when an equal sign (=) is encountered, how many elements must the stack contain so that no error is generated?
A) none
B) one
C) two
D) three
Q3) In a(n) ____________________ array, the first array position immediately follows the last array position.
Q4) In a queuing system, every customer has a customer number, arrival time, ____________________ time, transaction time, and departure time.
Q5) A technique in which one system models the behavior of another system is called
A) imitation
B) recursion
C) simulation
D) stimulation
To view all questions and flashcards with answers, click on the resource link above. Page 21