Applied Programming Techniques Exam Questions - 881 Verified Questions

Page 1


Applied Programming Techniques

Exam Questions

Course Introduction

Applied Programming Techniques is a practical course designed to deepen students understanding of modern programming paradigms and methodologies. Focusing on hands-on application, the course covers advanced topics such as algorithm optimization, data structures, software design patterns, debugging, and code testing. Students will work on real-world projects using popular programming languages, enhancing their problem-solving skills and code efficiency. The course emphasizes collaborative development, version control, and best practices for writing maintainable and scalable software, preparing students for professional environments in software engineering and related fields.

Recommended Textbook C++ Programming Program Design Including Data Structures 8th Edition by D. S. Malik

Available Study Resources on Quizplus

21 Chapters

881 Verified Questions

881 Flashcards

Source URL: https://quizplus.com/study-set/3128 Page 2

Chapter 1: An Overview of Computers and Programming Languages

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/128445

Sample Questions

Q1) Information stored in main memory must be transferred to some other device for permanent storage.

A)True

B)False

Answer: True

Q2) The programming language C++ evolved from ____.

A) BASIC

B) assembly

C) C

D) C+

Answer: C

Q3) Main memory is directly connected to the CPU.

A)True

B)False

Answer: True

Q4) The command that does the linking on Visual C++ Express (2013 or 2016) and Visual Studio 2015 is Make or Remake.

A)True

B)False Answer: False

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

Sample Questions

Q1) Suppose we declare a variable sum as an int.The statement "sum += 7;" is equivalent to the statement "sum = sum + 7;".

A)True

B)False

Answer: True

Q2) A comma is also called a statement terminator.

A)True

B)False

Answer: False

Q3) Suppose that alpha and beta are int variables.The statement alpha = ++beta; is equivalent to the statement(s) ____.

A) beta = beta + 1;

Alpha = beta;

B) alpha = beta; Beta = beta + 1;

C) alpha = alpha + beta;

D) alpha = beta + 1;

Answer: A

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

Chapter 3: Inputoutput

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/61983

Sample Questions

Q1) In C++, the dot is an operator called the ____________________operator.

Answer: member access

Q2) You can use the function getline to read a string containing blanks.

A)True

B)False

Answer: True

Q3) In C++, the dot is an operator called the ____ operator.

A) dot access

B) member access

C) data access

D) member

Answer: B

Q4) ____ is a parameterized stream manipulator.

A) endl

B) fixed

C) scientific

D) setfill

Answer: D

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

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/61984

Sample Questions

Q1) Which of the following will cause a logical error if you are attempting to compare x to 5?

A) if (x == 5)

B) if (x = 5)

C) if (x <= 5)

D) if (x >= 5)

Q2) Putting ____________________ in front of a logical expression reverses the value of that logical expression.

Q3) The ____________________ of relational and logical operators is said to be from left to right.

Q4) What does <= mean?

A) less than B) greater than C) less than or equal to D) greater than or equal to

Q5) A control structure alters the normal sequential flow of execution in a program. A)True B)False

Q6) Suppose found = true and num = 6.The value of the expression (!found) || (num > 6) is ____________________.

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

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/128468

Sample Questions

Q1) The ____ statement can be used to eliminate the use of certain (flag) variables.

A) while

B) switch

C) break

D) if

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 following while loop terminates when j > 20.

j = 0;

while (j < 20)

j++;

A)True

B)False

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

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

Chapter 6: User-Defined Function

Available Study Resources on Quizplus for this Chatper

41 Verified Questions

41 Flashcards

Source URL: https://quizplus.com/quiz/61986

Sample Questions

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

Q2) The heading of the function is also called the ____.

A) title

B) function signature

C) function head

D) function header

Q3) Which statement below about prototypes and headers is true?

A) Parameter names must be listed in the prototype, but not necessarily in the header.

B) Prototypes end with a semicolon, but headers do not.

C) Headers should come before prototypes.

D) Headers end with a semicolon, but prototypes do not.

Q4) A function ____________________ is a function that is not fully coded.

Q5) Stream variables (for example, ifstream and ofstream) should be passed by ____________________ to a function.

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

Chapter 7: Namespaces, the Class String, and

User-Defined Simple Data Types

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/61987

Sample Questions

Q1) Before using the data type string, the program must include the header file ____.

A) enum

B) iostream

C) string

D) std

Q2) An anonymous type can be passed as a parameter to a function.

A)True

B)False

Q3) In C++, you can create aliases to a previously defined data type by using the ____ statement.

A) typedef

B) using C) namespace

D) alias

Q4) Which of the following statements creates an anonymous type?

A) enum grades {A, B, C, D, F};

B) enum grades {};

C) enum {};

D) enum {A, B, C, D, F} grades;

Page 9

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

Chapter 8: Arrays

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/61988

Sample Questions

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

Q2) Which of the following statements declares alpha to be an array of 25 components of the type int?

A) int alpha[25];

B) int array alpha[25];

C) int alpha[2][5];

D) int array alpha[25][25];

Q3) If an array index goes out of bounds, the program always terminates in an error. A)True B)False

Q4) The ____________________ of an array is the address (that is, the memory location) of the first array component.

Q5) In a two-dimensional array, the elements are arranged in a table form. A)True B)False

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

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/61989

Sample Questions

Q1) A struct is typically a ____ data structure.

A) simple

B) dynamic

C) heterogeneous

D) linked

Q2) A function can return a value of the type struct.

A)True

B)False

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

Q4) The syntax for accessing a struct member is structVariableName____.

A) .memberName

B) *memberName

C) [memberName]

D) $memberName

Q5) Arrays are passed by ____________________ only.

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

43 Verified Questions

43 Flashcards

Source URL: https://quizplus.com/quiz/61990

Sample Questions

Q1) As parameters to a function, class objects can be passed by reference only.

A)True

B)False

Q2) If the heading of a member function of a class ends with the word const, then the function member cannot modify the private member variables, but it can modify the public member variables.

A)True

B)False

Q3) With ____________________ functions, the definitions of the member functions are placed in the implementations file.

Q4) A class and its members can be described graphically using a notation known as the ____ notation.

A) OON

B) OOD

C) UML

D) OOP

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

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

41 Verified Questions

41 Flashcards

Source URL: https://quizplus.com/quiz/61991

Sample Questions

Q1) To ____ a public member function of a base class in the derived class, the corresponding function in the derived class must have the same name, number, and types of parameters.

A) redefine

B) overload

C) rename

D) reuse

Q2) C++ provides ____________________ functions as a means to implement polymorphism in an inheritance hierarchy.

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

Q4) The class io is the base class of the C++ stream classes istream and ostream. A)True

B)False

Q5) In ____________________ (aggregation), one or more members of a class are objects of another class type.

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

44 Verified Questions

44 Flashcards

Source URL: https://quizplus.com/quiz/61992

Sample Questions

Q1) In a ____ copy, two or more pointers of the same type point to the same memory.

A) static

B) shallow

C) dynamic

D) deep

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

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

Q4) A(n) ____________________ is a collection of distinct elements of the same type.

Chapter 13: Operator Overloading and Templates

Available Study Resources on Quizplus for this Chatper

41 Verified Questions

41 Flashcards

Source URL: https://quizplus.com/quiz/61993

Sample Questions

Q1) Class templates are called ____ types.

A) polymorphic

B) structured

C) member

D) parameterized

Q2) Which of the following is the syntax to declare the operator function operator[] as a member function of a class for constant arrays?

A) const Type& []operator(int index) const;

B) const Type& operator[](int index) const;

C) const Type& operator[](int index);

D) const Type [](int index) const;

Q3) When an object invokes a member function, the member function references the pointer ____ of the object.

A) object

B) it

C) this

D) address

Q4) A(n) ____________________ returns random numbers whose likelihoods correspond to a specific shape such as uniform or normal.

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

43 Verified Questions

43 Flashcards

Source URL: https://quizplus.com/quiz/61994

Sample Questions

Q1) In C++, throw is a(n) ____________________ word.

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

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

Q4) To deal with logical errors in a program, such as a string subscript out of range or an invalid argument to a function call, several classes are derived from the class ____.

A) logic_error

B) logic_exception

C) runtime_error

D) exception

Q5) The class ____________________ deals with the string subscript out of range error.

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

43 Verified Questions

43 Flashcards

Source URL: https://quizplus.com/quiz/128470

Sample Questions

Q1) Consider the accompanying definition of the recursive function mystery.Given the declaration:int beta[10] = {2, 5, 8, 9, 13, 15, 18, 20, 23, 25}; What is the output of the following statement?

Cout << mystery(beta, 4, 7) << endl;

A) 27

B) 33

C) 55

D) 66

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

Q3) Which of the following function headings can be used for a recursive definition of a function to calculate the nth Fibonacci number?

A) void rFibNum(int a, int b)

B) bool rFibNum(int a, int b)

C) bool rFibNum(int a, int b, int n)

D) int rFibNum(int a, int b, int n)

Q4) If you execute an infinite recursive function on a computer, the function executes until the system runs out of ____________________.

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

Chapter 16: Linked Lists

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/61996

Sample Questions

Q1) Which of the following is a basic operation on singly linked lists?

A) Retrieve the data of an arbitrary node.

B) Swap the head and the last nodes.

C) Determine whether the list is nearly full.

D) Make a copy of the linked list.

Q2) Data can be organized and processed sequentially using an array, called a(n) ____ list.

A) linked

B) ordered

C) sequential

D) ascending

Q3) A linked list is a collection of components, called ____.

A) elements

B) nodes

C) members

D) pointers

Q4) A linked list is a random access data structure.

A)True

B)False

Q5) In a linked list, the link component of each node is a(n)

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

Chapter 17: Stacks and Queue

Available Study Resources on Quizplus for this Chatper

43 Verified Questions

43 Flashcards

Source URL: https://quizplus.com/quiz/61997

Sample Questions

Q1) Popping an element from an empty stack is called ____.

A) overflow

B) underflow

C) exception

D) overloading

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

Q3) In a queuing system, every customer has a customer number, arrival time, ____________________ time, transaction time, and departure time.

Q4) The expression a + b is the same in both infix notation and postfix notation.

A)True

B)False

Q5) If you try to add a new item to a full stack, the resulting condition is called an outflow.

A)True

B)False

Q6) A queue is a First In First Out data structure.

A)True

B)False

Q7) The elements at the ____________________ of the stack have been in the stack the longest.

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

Chapter 18: Searching and Sorting Algorithms

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/61998

Sample Questions

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

Q2) The sequential search algorithm uses a(n) ____ variable to track whether the item is found.

A) int

B) bool

C) char

D) double

Q3) If n = 1000, to sort the list, bubble sort makes about ____ item assignments.

A) 10,000

B) 100,000

C) 250,000

D) 500,000

Q4) Let f be a function of n.By the term ____________________, we mean the study of the function f as n becomes larger and larger without bound.

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

Chapter 19: Binary Trees

Available Study Resources on Quizplus for this Chatper

43 Verified Questions

43 Flashcards

Source URL: https://quizplus.com/quiz/61999

Sample Questions

Q1) In a binary tree, the branches go only from a child to a parent.

A)True

B)False

Q2) To delete an item from the binary search tree, you must do the following:1.Find the node containing the item (if any) to be deleted.

2.Delete the node.

A)True

B)False

Q3) Consider that A is a binary tree, C and D are the subtrees of A.Which of the following statements is always true?

A) C and D are binary trees.

B) C and D are search binary trees.

C) C and D are empty trees.

D) A is empty.

Q4) In the diagram of a binary tree, an arrow is called a(n) ____.

A) relation

B) path

C) directed line

D) directed branch

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

Chapter 20: Graph Algorithms

Available Study Resources on Quizplus for this Chatper

48 Verified Questions

48 Flashcards

Source URL: https://quizplus.com/quiz/62000

Sample Questions

Q1) The starting vertex of a shortest path in a graph is called the ____________________.

Q2) A set Y is called a(n) ____________________ of X if every element of Y is also an element of X.

Q3) A(n) ____________________ ordering of the vertices of the accompanying graph is 0, 1, 3, 4, 2, 5, 7, 8, 6, 9.

Q4) The ____________________ traversal of a graph is similar to traversing a binary tree level by level.

Q5) A(n) ____ tree T is a simple graph such that if u and v are two vertices in T, a unique path exists from u to v.

A) rooted

B) free C) spanning D) weighted

Q6) The ____ of sets A and B is the set of all elements that are in A and B. A) intersection

B) union

C) graph

D) reunion

Page 22

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

Chapter 21: Standard Template Library

Available Study Resources on Quizplus for this Chatper

41 Verified Questions

41 Flashcards

Source URL: https://quizplus.com/quiz/62001

Sample Questions

Q1) If the data needs to be processed in a(n) ____ manner, use a queue.

A) FILO

B) LILO

C) LIFO

D) FIFO

Q2) The vector container stores and manages its objects in a dynamic array.

A)True

B)False

Q3) Predicates are special types of function objects that return ____ values.

A) character

B) string

C) Boolean

D) Integer

Q4) The ____ operation returns a pointer to the position before the first element in container ct.

A) ct.front()

B) ct.rbegin()

C) ct.rend()

D) ct.end()

Q5) ____________________ predicates check a specific property for a single argument.

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

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.