

Advanced Programming Concepts
Practice Exam
Course Introduction
This course delves into sophisticated programming paradigms and techniques crucial for building robust, maintainable, and efficient software. Topics include object-oriented and functional programming principles, design patterns, concurrent and parallel programming, memory management, and advanced data structures. Students will gain hands-on experience in designing and implementing complex applications using contemporary programming languages and tools, preparing them for tackling real-world software engineering challenges and contributing to large-scale software projects.
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
Chapter 1: An Overview of Computers and Programming Languages
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128446
Sample Questions
Q1) The machine language version of the high-level language program is called a(n)
Answer: object program
Q2) In C++, the mechanism that allows you to combine data and operations on the data into a single unit is called a(n) ____________________.
Answer: class
Q3) In ____________________ design, the final program is a collection of interacting objects.
Answer: object-oriented object oriented

Q4) ____________________ languages include FORTRAN, COBOL, Pascal, C, C++, and Java.
Answer: High-level high-level
High level high level
To view all questions and flashcards with answers, click on the resource link above. Page 3

Chapter 2: Basic Elements of C
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21709
Sample Questions
Q1) ____________________ functions are those that have already been written and are provided as part of the system.
Answer: Predefined predefined Standard standard
Q2) The maximum number of significant digits is called the ____________________.
Answer: precision
Q3) Suppose that alpha and beta are int variables. The statement alpha = beta++; is equivalent to the statement(s) ____.
A) alpha = 1 + beta;
B) alpha = alpha + beta; C) alpha = beta; Beta = beta + 1;
D) beta = beta + 1; Alpha = beta;
Answer: C
Q4) ____________________ rules determine the meaning of instructions. Answer: Semantic semantic
4
To view all questions and flashcards with answers, click on the resource link above.

Chapter 3: Inputoutput
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21710
Sample Questions
Q1) When reading data into a char variable, after skipping any leading whitespace characters, the extraction operator >> finds and stores only the next character; reading stops after a single character.
A)True
B)False
Answer: True
Q2) In C++, the dot is an operator called the ____________________operator. Answer: member access
Q3) The functions get, ignore, and so on are members of the data type
Answer: istream
Q4) To use the manipulator setprecision, the program must include the header file ____________________.
Answer: iomanip
Q5) To use a parameterized stream manipulator in a program, you must include the header file ____________________.
Answer: iomanip
Q6) cin is called a(n) ____________________ object. Answer: istream
To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: Control Structures I Selection
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21711
Sample Questions
Q1) Putting ____________________ in front of a logical expression reverses the value of that logical expression.
Q2) Which of the following operators has the highest precedence?
A) !
B) *
C) %
D) =
Q3) In C++, the logical operator AND is represented by ____________________.
Q4) What does <= mean?
A) less than B) greater than
C) less than or equal to D) greater than or equal to
Q5) The result of a logical expression cannot be assigned to an int variable, but it can be assigned to a bool variable.
A)True
B)False
Q6) A ____________________ operator allows you to make comparisions in a program.
To view all questions and flashcards with answers, click on the resource link above. Page 6
Q7) The ____________________ of relational and logical operators is said to be from left to right.

Chapter 5: Control Structures II Repetition
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21712
Sample Questions
Q1) In a counter-controlled while loop, the loop control variable must be initialized before the loop.
A)True B)False
Q2) What is the initial statement in the following for loop? (Assume that all variables are properly declared.) int i; for (i = 1; i < 20; i++) \(\quad\)cout << "Hello World"; cout << "!" << endl;
A) i = 1; B) i < 20; C) i++;
D) cout << "Hello World";
Q3) 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
To view all questions and flashcards with answers, click on the resource link above.
Page 7

Chapter 6: User-Defined Functions
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21713
Sample Questions
Q1) Given the function prototype: double testAlpha(int u, char v, double t); which of the following statements is legal?
A) cout << testAlpha(5, 'A', 2);
B) cout << testAlpha( int 5, char 'A', int 2);
C) cout << testAlpha('5.0', 'A', '2.0');
D) cout << testAlpha(5.0, "65", 2.0);
Q2) If a formal parameter is a nonconstant reference parameter, during a function call, its corresponding actual parameter must be a(n) ____________________.
Q3) Functions that do not have a return type are called ____ functions. A) zero
B) null
C) void
D) empty
Q4) The following return statement returns the value 10. return 10, 16;
A)True
B)False
Q5) The ____________________ of an identifier refers to where in the program an identifier is accessible (visible).
To view all questions and flashcards with answers, click on the resource link above. Page 8
Chapter 7: User-Defined
Simple Data Types, Namespaces, and the String Type
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21714
Sample Questions
Q1) In ANSI/ISO Standard C++, the ____________________ mechanism was designed to solve the problem of overlapping global identifiers.
Q2) The length of the string "Hello There. " is ____.
A) 11
B) 12
C) 13
D) 14
Q3) Suppose that str1, str2, and str3 are string variables. After the following statements execute, the value of str3 is "____". str1 = "abc";
Str2 = "xyz";
Str3 = str1 + '-' + str2;
A) abc
B) xyz
C) abc-xyz
D) xyz-abc
Q4) A function cannot return the value of an enumeration type.
A)True
B)False

9
Q5) The values in the domain of an enumeration type are called
To view all questions and flashcards with answers, click on the resource link above.

Chapter 8: Arrays and Strings
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21715
Sample Questions
Q1) The function ____________________ returns the length of the string s, excluding the null character.
Q2) In the following declaration, the array gamma has ____________________ components. int gamma[5][6][10];
Q3) 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++) 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
Q4) In a(n) ____________________ data type, each data item is a collection of other data items.
Q5) The following statements store the value ____________________ into len. int len; len = strlen("Sunny California");
Page 10
Q6) The statement strlen("Marylin Stewart"); returns ____________________.
To view all questions and flashcards with answers, click on the resource link above.

Chapter 9: Records Structs
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21716
Sample Questions
Q1) Relational operations can be used on struct variables.
A)True
B)False
Q2) Which of the following aggregate operations can be executed on array variables?
A) Arithmetic
B) Assignment
C) Function returning a value
D) Parameter passing by reference
Q3) To compare struct variables, you compare them ____.
A) by reference
B) by value
C) index-wise
D) member-wise
Q4) The components of a struct are called the ____ of the struct.
A) variables
B) identifiers
C) elements
D) members
Q5) Memory is allocated for struct variables only when you ____________________ them.
To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Classes and Data Abstraction
Available Study Resources on Quizplus for this Chatper
49 Verified Questions
49 Flashcards
Source URL: https://quizplus.com/quiz/21717
Sample Questions
Q1) A(n) ____________________ contains the definitions of the functions to implement the operations of an object.
Q2) A class object can be ____. That is, it can be created once, when the control reaches its declaration, and destroyed when the program terminates. A) static B) automatic C) local D) public
Q3) If a class object is passed by ____________________, the contents of the member variables of the actual parameter are copied into the corresponding member variables of the formal parameter.
Q4) A(n) ____________________ is a statement specifying what is true after the function call is completed.
Q5) To create the object code file for any source code file, the command line option ____________________ is used on the system command line.
Q6) Classes were specifically designed in C++ to handle ____________________.
Q7) A(n) ____________________ is a statement specifying the condition(s) that must be true before the function is called.
Page 12
To view all questions and flashcards with answers, click on the resource link above.

Chapter 11: Inheritance and Composition
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21718
Sample Questions
Q1) In ____________________, the derived class is derived from a single base class.
Q2) A derived class can directly access the protected members of the base class.
A)True
B)False
Q3) The constructors of a derived class can (directly) initialize only the (public data) members inherited from the base class of the derived class.
A)True
B)False
Q4) If the derived class does not override a public member function of the base class, you may specify a call to that public member function by using the name of the function and the appropriate parameter list.
A)True
B)False
Q5) ____ is the ability to combine data, and operations on that data, in a single unit.
A) Inheritance
B) Encapsulation
C) Polymorphism
D) Composition
To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: Pointers, Classes, Virtual Functions, and
Abstract Classes
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21719
Sample Questions
Q1) The ____________________ of a base class automatically makes the destructor of a derived class virtual.
Q2) Given the declaration int *p;
The statement p = new int[50]; dynamically allocates an array of 50 components of type int and p contains the base address of the array.
A)True
B)False
Q3) A pointer variable is a variable whose content is a memory address. A)True
B)False
Q4) In the statement int* p, q; p and q are pointer variables.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 14
Q5) The binding of virtual functions occurs at program ____________________ time.

Chapter 13: Overloading and Templates
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21720
Sample Questions
Q1) The operators that cannot be overloaded are ., .*, ::, ?:, and ____________________.
Q2) A(n) ____________________ constructor converts its argument to an object of the constructor's class.
Q3) The ____________________ operator function as a member of a class has only one parameter; as a nonmember of a class, it has two parameters.
Q4) Every object of a class maintains a (hidden) pointer to itself, and the name of this pointer is ____.
A) self
B) object
C) it
D) this
Q5) The general form of the functions to overload the binary operators as member functions of a class is returnType operator#(____ className&) const;.
A) class
B) const
C) *
D) &
To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Exception Handling
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21721
Sample Questions
Q1) Which of the following options should you choose when an exception occurs in the program that analyzes an airline's ticketing transactions?
A) Terminate the program.
B) Include code in the program to recover from the exception.
C) Log the error and continue.
D) Include code in the header file.
Q2) All derived classes of the class exception override the function ____________________ to issue their own error messages.
Q3) One of the typical ways of dealing with exceptions is to use an if statement.
A)True
B)False
Q4) The class ____________________ deals with the string subscript out of range error.
Q5) When division by zero occurs and the problem is not addressed, the program crashes with an error message that is ____ dependent.
A) code
B) computer
C) platform
D) IDE
To view all questions and flashcards with answers, click on the resource link above. Page 16

Chapter 15: Recursion
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21722
Sample Questions
Q1) 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.
Q2) Which of the following solution methods would be the best choice for a mission control system?
A) Iterative
B) Direct recursive
C) Indirect recursive
D) Infinite recursive
Q3) Consider the following code. int fact(int num)
{ if (num == 0)
\(\quad\)return 1; else
\(\quad\)return num * fact(num - 1); }
The function fact is an example of a(n) ____________________ recursive function.
Q4) The collating sequence of A in the ASCII character set is ____________________.
To view all questions and flashcards with answers, click on the resource link above. Page 17
Q5) Recursive algorithms are implemented using ____________________ functions.

Chapter 16: Searching, Sorting and the Vector Type
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21723
Sample Questions
Q1) During the sorting phase of insertion sort, the array containing the list is divided into two sublists, sorted and unsorted.
A)True
B)False
Q2) 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
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 element to be found is first compared with ____. A) 4
B) 25
C) 39
D) 95
Q4) The first element in a vector object is at location ____________________.
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
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21724
Sample Questions
Q1) Each node of a singly linked list has two components: ____ and ____.
A) info, head
B) link, back
C) back, head
D) info, link
Q2) Data can be organized and processed sequentially using an array, called a(n) ____ list.
A) linked
B) ordered
C) sequential
D) ascending
Q3) Because each node of a linked list has two components, we need to declare each node as a(n) ____.
A) reference and string
B) int and object
C) index and element
D) class or struct
Q4) Linked lists allow you to overcome the size limitations of an array data type.
A)True
B)False
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
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/21725
Sample Questions
Q1) Popping an element from an empty stack is called ____.
A) overflow
B) underflow
C) exception
D) overloading
Q2) You can perform the operation ____ to remove the top element from the stack.
A) dequeue
B) top
C) pop
D) push
Q3) If the queue is empty, the operation ____________________ terminates the program.
Q4) A stack can be implemented as either a(n) ____ or a linked structure.
A) map
B) struct
C) queue
D) array
Q5) In a queuing system, we use a(n) ____________________ variable to set the status of the server.
Q6) In ____________________ notation, operators are written after the operands.
Page 20
To view all questions and flashcards with answers, click on the resource link above.