Advanced Programming Techniques Study Guide Questions
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
management, and modular architecture. Students will engage in hands-on projects that
emphasize writing efficient, maintainable, and scalable code, while also learning to
Recommended Textbook
C++ Programming Program Design Including Data Structures 6th Edition by D.S. Malik
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
Q3) 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.
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
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
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
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', '&');
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);
To view all questions and flashcards with answers, click on the resource link above.
Page 8
Chapter 7: User-Defined Simple Data Types, Namespaces,
Sample Questions
Q1) In July ____,ANSI/ISO Standard C++ was officially approved.
A) 1996
B) 1998
C) 1999
D) 2000
Q3) Suppose str = "ABCDEFGHI".The output of the statement cout << str.length()<< endl;
Is ____.
A) 7
B) 8
C) 9
D) 10
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
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.
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.
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;
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
To view all questions and flashcards with answers, click on the resource link above.
Page 13
Chapter 12: Pointers, Classes, Virtual Functions, Abstract
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
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;
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){ }
Q3) The ____________________ of the catch block parameter specifies the type of
exception that the catch block can catch.
Sample Questions
Q1) The language of a computer,called ____________________ language,is a
series of 0s and 1s.
Q5) With recursion,the base case must eventually be reduced to a general case.
A)True
B)False
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.
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
Sample Questions
Q1) The ____________________ elements of a stack and queue should not be
accessed directly.
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
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>
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.
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
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
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
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.
Page 23____________________.
Q6) List containers are implemented as doubly
To view all questions and flashcards with answers, click on the resource link above.