[go: up one dir, main page]

0% found this document useful (0 votes)
4 views23 pages

Advanced Programming Techniques Study Guide Questions

The Advanced Programming Techniques Study Guide covers sophisticated methods in software development, including advanced data structures, design patterns, and memory management. It includes 21 chapters with 1050 verified questions and flashcards to aid learning. The course emphasizes practical projects to enhance students' coding skills in C++.

Uploaded by

8wkaoczacs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views23 pages

Advanced Programming Techniques Study Guide Questions

The Advanced Programming Techniques Study Guide covers sophisticated methods in software development, including advanced data structures, design patterns, and memory management. It includes 21 chapters with 1050 verified questions and flashcards to aid learning. The course emphasizes practical projects to enhance students' coding skills in C++.

Uploaded by

8wkaoczacs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Advanced Programming

Techniques Study Guide


Questions

https://quizplus.com/study-set/319
21 Chapters
1050 Verified Questions
Advanced Programming Techniques
Study Guide Questions
Course Introduction
Advanced Programming Techniques explores sophisticated methods and paradigms

used in modern software development. The course covers topics such as advanced

data structures, design patterns, functional and concurrent programming, memory

management, and modular architecture. Students will engage in hands-on projects that

emphasize writing efficient, maintainable, and scalable code, while also learning to

debug and optimize complex applications. Through practical examples and

collaborative learning, participants will gain a deeper understanding of how advanced

programming concepts are applied in professional environments.

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
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/128444

Sample Questions
Q1) Main memory is called ____.
A) read only memory
B) random access memory
C) read and write memory
D) random read only memory
Answer: B

Q2) In object-oriented design,the first step in the problem-solving process is to identify


the components called ____________________,which form the basis of the
solution,and to determine how they interact with one another.
Answer: objects

Q3) In a C++ program,statements that begin with the symbol # are called
____________________ directives.
Answer: preprocessor

Q4) Main memory is directly connected to the CPU.


A)True
B)False
Answer: True

Q5) The ASCII data set consists of ____________________ characters.


Page 3
Answer: 128

To view all questions and flashcards with answers, click on the resource link above.
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/5305

Sample Questions
Q1) The expression static_cast<int>(9.9)evaluates to ____.
A) 9
B) 10
C) 9.9
D) 9.0
Answer: A

Q2) ____ is a valid char value.


A) -129
B) 'A'
C) 128
D) 129
Answer: B

Q3) The ____________________ type is C++ 's method for allowing programmers
to create their own simple data types.
Answer: enumeration

Q4) When a value of one data type is automatically changed to another data
type,a(n)____________________ type coercion is said to have occurred.
Answer: implicit

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

Page 4
Chapter 3: Input/Output
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5306

Sample Questions
Q1) C++ comes with a wealth of functions,called ____________________
functions,that are written by other programmers.
Answer: predefined
pre defined
pre-defined

Q2) Suppose that ch1 and ch2 are char variables,alpha is an int variable,and the input is:
A 18
What are the values after the following statement executes?
cin.get(ch1);
cin.get(ch2);
cin >> alpha;
A) ch1 = 'A', ch2 = ' ', alpha = 18
B) ch1 = 'A', ch2 = '1', alpha = 8
C) ch1 = 'A', ch2 = ' ', alpha = 1
D) ch1 = 'A', ch2 = '\n', alpha = 1
Answer: A

Q3) C++ provides a header file called ____________________,which is used for file
I/O.
Answer: fstream

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/5307

Sample Questions
Q1) What is the output of the following C++ code?
int x = 35;
int y = 45;
int z;
if (x > y)
\(\quad\)z = x + y;
else
\(\quad\)z = y - x;
Cout << x << " " << y << " " << z << endl;
A) 35 45 80
B) 35 45 10
C) 35 45 -10
D) 35 45 0

Q2) Every else must be paired with a(n)____________________.

Q3) The value of the expression 6 < 5 || 'g' > 'a' && 7 < 4
is ____________________.
A)True
B)False

Q4) Putting a semicolon after the parentheses following the expression in an if statement
(that is,before the statement)is a(n)____________________ error.

Page 6
To view all questions and flashcards with answers, click on the resource link above.
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/128467

Sample Questions
Q1) The ____________________ loop has an exit condition but no entry condition.

Q2) In a while and for loop,the loop condition is evaluated before executing the body of
the loop.Therefore,while and for loops are called ____________________ loops.

Q3) To generate a random number,you can use the function rand of the header file
____________________.

Q4) 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

Q5) A software ____________________ is a piece of code written on top of an


existing piece of code intended to fix a bug in the original code.

To view all questions and flashcards with Page 7 click on the resource link above.
answers,
Chapter 6: User-Defined Functions
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5309

Sample Questions
Q1) Given the following function prototype: int test(float,char);,which of the following
statements is valid?
A) cout << test(12, &);
B) cout << test("12.0", '&');
C) int u = test(5.0, '*');
D) cout << test('12', '&');

Q2) A(n)____________________ parameter s a formal parameter that receives a


copy of the content of the corresponding actual parameter.

Q3) 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);

Q4) Which of the following function prototypes is valid?


A) int funcExp(int x, float v);
B) funcExp(int x, float v){};
C) funcExp(void);
D) int funcExp(x);

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/5310

Sample Questions
Q1) In July ____,ANSI/ISO Standard C++ was officially approved.
A) 1996
B) 1998
C) 1999
D) 2000

Q2) In C++,____ is a reserved word.


A) deftype
B) typedef
C) typecc
D) alias

Q3) Suppose str = "ABCDEFGHI".The output of the statement cout << str.length()<< endl;
Is ____.
A) 7
B) 8
C) 9
D) 10

Q4) Suppose str = "ABCDEFG".The output of the statement


cout << str.length()<< endl;
is ____________________. Page 9

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/5311

Sample Questions
Q1) When you pass an array as a parameter,the base address of the actual array is
passed to the formal parameter.
A)True
B)False

Q2) All components of an array are of the same data type.


A)True
B)False

Q3) The ____________________ of an array is the address (that is,the memory


location)of the first array component.

Q4) Consider the statement int list[10][8];.Which of the following about list is true?
A) list has 10 rows and 8 columns.
B) list has 8 rows and 10 columns.
C) list has a total of 18 components.
D) list has a total of 108 components.

Q5) The declaration char str[] = "Hello there"; declares str to be a string of
____________________ characters.

Q6) The statement strlen("Marylin Stewart"); returns ____________________.

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

Page 10
Chapter 9: Records (structs)
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5312

Sample Questions
Q1) A struct is a(n)____________________,not a declaration.

Q2) Consider the following statements: struct studentType1


{
\(\quad\)string name;
\(\quad\)int ID;
\(\quad\)double gpa;
};
studentType1 student1,student2;
struct studentType2
{
\(\quad\)string name;
\(\quad\)int ID;
\(\quad\)double gpa;
};
studentType2 student3,student4;
Which of the following statements is valid in C++?
A) student2 = student3;
B) student1 = student4;
C) student2.ID = ID;
D) student1.ID = student3.ID;

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
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/128469

Sample Questions
Q1) Consider the accompanying class definition,and the object declaration:
rectangleType bigRect(14,10);
Which of the following statements is correct?
A) bigRect.setLengthWidth();
B) bigRect.setLengthWidth(3.0, 2.0);
C) bigRect.length = 2.0;
D) bigRect.length = bigRect.width;

Q2) 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.

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) The public members of a class must be declared before the private members.
A)True
B)False

To view all questions and flashcards with answers, click on the resource link above.
Page 12
Chapter 11: Inheritance and Composition
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5314

Sample Questions
Q1) ____ is the ability to use the same expression to denote different operations.
A) Inheritance
B) Encapsulation
C) Polymorphism
D) Composition

Q2) Consider the following class definition: class dClass: bClass


{
//class members list
};
The class dClass is derived from the class bClass using the ____ type of inheritance.
A) public
B) private
C) protected
D) static

Q3) Inheritance is an example of a(n)____ relationship.


A) is-a
B) has-a
C) handshaking
D) had-a

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

Page 13
Chapter 12: Pointers, Classes, Virtual Functions, Abstract

Classes, and Lists


Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5315

Sample Questions
Q1) What is the value of x after the following statements execute? int x = 25;
Int *p;
P = &x;
*p = 46;
A) NULL
B) 0
C) 25
D) 46

Q2) A pointer variable is a variable whose content is a memory address.


A)True
B)False

Q3) What is the output of the following statements?


int x = 33;
int *q;
q = &x;
cout << *q << endl;
A) NULL
B) 0
C) 3
D) 33 Page 14

To view all questions and flashcards with answers, click on the resource link above.
Chapter 13: Overloading and Templates
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5316

Sample Questions
Q1) Which of the following function prototypes overloads the != operator for the class
rectangleType?
A) bool operator!=(rectangle&) const;
B) bool operator!=(const rectangleType&) const;
C) int operator!=(const rectangleType) const;
D) int operator!=(rectangle&) const;

Q2) The associativity of the operator = is from right to left.


A)True
B)False

Q3) The general syntax of the function prototype 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&);

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

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/5317

Sample Questions
Q1) Which of the following blocks is designed to catch any type of exception?
A) catch(){ }
B) catch(...){ }
C) catch(*){ }
D) catch(exception){ }

Q2) A(n)____ is an occurrence of an undesirable situation that can be detected during


program execution.
A) error
B) exception
C) mistake
D) bug

Q3) The ____________________ of the catch block parameter specifies the type of
exception that the catch block can catch.

Q4) 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);

Q5) Throwing an exception is typically done using the ____________________


statement.
Page 16
To view all questions and flashcards with answers, click on the resource link above.
Chapter 15: Recursion
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5318

Sample Questions
Q1) The language of a computer,called ____________________ language,is a
series of 0s and 1s.

Q2) ____ control structures use a looping structure,such as while,for,or do...while,to


repeat a set of statements.
A) Iterative
B) Recursive
C) Procedural
D) Object

Q3) Consider the accompanying definition of a recursive function.What is the output of


the following statement? cout << puzzle(5,10)<< endl;
A) 720
B) 5040
C) 5760
D) 10800

Q4) The collating sequence of A in the ASCII character set is


____________________.

Q5) With recursion,the base case must eventually be reduced to a general case.
A)True
B)False

Q6) The ____________________ bitPage


of 33 17
is 1.

To view all questions and flashcards with answers, click on the resource link above.
Chapter 16: Linked Lists
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5319

Sample Questions
Q1) If a formal parameter is a value parameter,the ____________________
constructor provides the formal parameter with its own copy of the data.

Q2) In a linked list,the ____________________ operator returns the info of the


current node.

Q3) In a circular linked list with more than one node,it is convenient to make the pointer
first point to the ____________________ node of the list.

Q4) Every node (except of the last node)in a singly linked list contains ____.
A) the next node
B) no address information
C) the address of the next node
D) the address of the previous node

Q5) In a linked list,if a new item is always inserted at the beginning or at the end of the
list and the data read is unsorted,the linked list will be unsorted.
A)True
B)False

Q6) Linked lists allow you to overcome the size limitations of an array data type.
A)True
B)False

To view all questions and flashcards withPage


answers,
18 click on the resource link above.
Chapter 17: Stacks and Queues
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5320

Sample Questions
Q1) The ____________________ elements of a stack and queue should not be
accessed directly.

Q2) Which of the following is a basic operation performed on a queue?


A) push
B) pop
C) isEmptyQueue
D) top

Q3) 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

Q4) A queue is a data structure in which the elements are ____.


A) added to the rear and deleted from the front
B) added to and deleted from the rear
C) added to and deleted from the front
D) added and deleted in the middle

Q5) An array is a(n)____________________ access data structure.

Page 19
Q6) In ____________________ notation,operators are written after the operands.

To view all questions and flashcards with answers, click on the resource link above.
Chapter 18: Searching and Sorting Algorithms
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5321

Sample Questions
Q1) The quick sort algorithm uses the ____________________ technique to sort a
list.

Q2) The sequential search algorithm does not require that the list be sorted.
A)True
B)False

Q3) For a list of length n,selection sort makes ____ item assignments.
A) n(n - 1)/2
B) 3(n - 1)
C) 3(n)
D) 4(n + 1)

Q4) A sequential search of an n-element list takes ____ key comparisons if the item is
not in the list.
A) 0
B) n/2
C) n
D) n<sup>2</sup>

Q5) The binary search algorithm can be written iteratively or recursively.


A)True
B)False

Q6) The ____________________ Page 20 algorithm is the optimal worst-case


search
algorithm for solving search problems by using the comparison method.

To view all questions and flashcards with answers, click on the resource link above.
Chapter 19: Binary Trees
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5322

Sample Questions
Q1) Let T be a binary search tree with n nodes,in which n > 0.When T is linear,the search
algorithm makes ____________________ key comparisons,in the unsuccessful
case.

Q2) To destroy a binary tree,for each node,first we destroy its left subtree,then its right
subtree,and then the node itself.We must then use the operator
____________________ to deallocate the memory occupied by the node.

Q3) A binary tree is empty if root is ____.


A) 0
B) 1
C) "zero"
D) NULL

Q4) A node in a binary tree is called a(n)____ if it has no left and right children.
A) edge
B) branch
C) leaf
D) path

Q5) Duplicates are allowed in a binary search tree.


A)True
B)False

To view all questions and flashcards withPage 21 click on the resource link above.
answers,
Chapter 20: Graphs
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5323

Sample Questions
Q1) The depth first traversal is similar to the postorder traversal of a binary tree.
A)True
B)False

Q2) A(n)____________________ ordering of the vertices of the accompanying


graph is 0,1,4,3,2,5,7,8,6,9.

Q3) Linked lists cannot be used to implement an adjacency list.


A)True
B)False

Q4) It is possible to design Prim's algorithm so that it is of the order O(n²).


A)True
B)False

Q5) A tree T is called a(n)____ tree of graph G if T is a subgraph of G such that V(T)=
V(G); that is,if all vertices of G are in T.
A) weighted
B) spanning
C) rooted
D) directed

Q6) The starting vertex of a shortest path in a graph is called the


____________________.
Page 22
To view all questions and flashcards with answers, click on the resource link above.
Chapter 21: Standard Template Library (STL)
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/5324

Sample Questions
Q1) The ____ typedef iterators is common to all containers.
A) random_access
B) bidirectional
C) pointer
D) forward

Q2) The ____ operation on a vector container deletes the last element.
A) vecList.pop_back()
B) vecList.pop()
C) vecList.push_back()
D) vecList.back()

Q3) The ____________________ iterators are used to output data from a program
into an output stream.

Q4) Every object in a(n)____ container has a specific position.


A) adapter
B) sequence
C) associative
D) static

Q5) ____________________ predicates check a specific property for a pair-that


is,two arguments.

Page 23____________________.
Q6) List containers are implemented as doubly

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

You might also like