Introduction To Algorithms MCQ PDF
Introduction To Algorithms MCQ PDF
https://quizplus.com/study-set/1537
15 Chapters
655 Verified Questions
Introduction to Algorithms
MCQ PDF
Cou
Introduction to Algorithms provides students with a foundational understanding of
real-world problems. Through hands-on exercises and projects, students gain practical
Recommended Textbook
Starting Out with Programming Logic and Design 3rd Edition by Tony Gaddis
Page 2
Chapter 1: Introduction to Computers and Programming
Available Study Resources on Quizplus for this Chatper
48 Verified Questions
48 Flashcards
Source URL: https://quizplus.com/quiz/30362
Sample Questions
Q1) The statements that a programmer writes in a high-level language are called
_________.
Answer: source code or code
Q3) Programs that use an interpreter generally execute faster than compiled programs
because they are already entirely translated into machine language when executed.
A)True
B)False
Answer: False
To view all questions and flashcards with answers, click on the resource link above.
Page 3
Chapter 2: Input, processing, and Output
Available Study Resources on Quizplus for this Chatper
48 Verified Questions
48 Flashcards
Source URL: https://quizplus.com/quiz/30363
Sample Questions
Q1) To determine a program's ______________ requirements,you must determine
the pieces of data required for the program to complete its task.
Answer: input
Q2) The process where the programmer steps through each of the program's
statements one by one is called _____________.
A)Hand tracing
B)Debug
C)Execute
D)Run
E)Checking
Answer: A
Q3) The ___________ operator performs division and returns the remainder.
Answer: modulus
Q4) A ________________ statement specifies the variable's name and the variable's
data type.
Answer: variable declaration
Sample Questions
Q1) Any piece of data that is passed into a module when a module is executed is called
an _____________.
Answer: argument
Q2) Which type of variable is not recommended to be used in programs because they
make programs hard to understand and debug?
A)Local
B)Pass by value
C)Reference
D)Global
E)Pass by reference
Answer: D
Q4) A ______________ variable acts as an alias for the variable that was passed into
the module through an argument.
Answer: reference
Q5) The __________ of the module is a list of statements that belong to the module.
Answer: body
Sample Questions
Q1) In an expression with an OR operator,it does not matter which sub expression is true
for the compound expression to be true.
A)True
B)False
Q2) Which operator is best to determine whether x contains a value in the range of 10
through 57?
A)AND
B)NOT
C)OR
D)==
E)None of the above
Q3) The ____________ operator is used to determine whether the operands are
exactly the same as each other.
To view all questions and flashcards with answers, click on the resource link above.
Page 6
Chapter 5: Repetition Structures
Available Study Resources on Quizplus for this Chatper
44 Verified Questions
44 Flashcards
Source URL: https://quizplus.com/quiz/30366
Sample Questions
Q1) What type of loop uses a Boolean expression to control the number of times that it
repeats a statement or set of statements?
A)Count-controlled
B)Condition-controlled
C)While
D)Do-while
E)Do-until
Q4) In a count-controlled loop the test action compares the counter variable to the
_________ value to determine if the loop iterates or terminates.
Q5) The term __________ is used in the For loop if the counter needs to be
incremented by a value other than one.
Sample Questions
Q1) The input column in the IPO chart describes the process the function performs on the
input data.
A)True
B)False
Q2) The ________ function does the same thing as using the mathematical ^
operator.
A)cos
B)abs
C)sqrt
D)round
E)pow
Q3) When a function finishes,it returns a value back to the part of the program that
called it.
A)True
B)False
Q4) What term is used in the ending terminal symbol of a function flowchart?
A)Return
B)End
C)Function End
D)Function Return
E)None of the above
Page 8
To view all questions and flashcards with answers, click on the resource link above.
Chapter 7: Input Validation
Available Study Resources on Quizplus for this Chatper
44 Verified Questions
44 Flashcards
Source URL: https://quizplus.com/quiz/30368
Sample Questions
Q1) _______________ is sometimes the term used for input validation.
A)Input error
B)Error trap
C)Input trap
D)Data error
E)None of the above
Q3) If the user provides bad data as input to a program,the program will correct the
data and produce output.
A)True
B)False
Q4) After the string is read it is determined if it can be converted to the desired data type
in a _____________ error.
Q5) __________ programming is the practice of anticipating errors that can happen
while a program is running.
Q6) The input operation that is performed just before a validation loop is known as the
_________.
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
46 Verified Questions
46 Flashcards
Source URL: https://quizplus.com/quiz/30369
Sample Questions
Q1) The first step in finding the highest value in an array is to create a ____________
to hold the highest value.
Q3) ________________ arrays are two or more arrays that hold related data,and the
elements are accessed using a common subscript.
A)Sequential
B)Binary
C)Parallel
D)Linear
E)None of the above
Q4) If array name contains a list of names,name[1] is the name of the first person.
A)True
B)False
Q5) In the following declaration,what is the data type of the elements of the array?
Declare Integer numbers [SIZE]
A)SIZE
B)numbers
C)Integer
D)Declare
E)None of the above
Page 10
To view all questions and flashcards with answers, click on the resource link above.
Chapter 9: Sorting and Searching Arrays
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/30370
Sample Questions
Q1) In a selection sort algorithm,the variable minValue holds the smallest value found in
the scanned area of the array.
A)True
B)False
Q2) In a binary search,if the search fails to find the item on the first attempt,then there
are 999 elements left to search in an array of 1000 elements.
A)True
B)False
Q3) Which statement is true after the execution of the following statements?
Set x = y
Set y = x
A)x and y contain their original values
B)x and y swapped their values
C)x contains the value in y and y stayed the same
D)y contains the value in x and x stayed the same
E)None of the above
Q4) The data in an array can be sorted in either ascending or descending order.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 11
Chapter 10: Files
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/30371
Sample Questions
Q1) Which flowcharting symbol is used for opening and closing files?
A)Rectangle
B)Parallelogram
C)Diamond
D)Oval
E)None of the above
Q2) A file with the extension.doc usually indicates that the file contains a note written by
a doctor.
A)True
B)False
Q4) The term output file is used to describe a file that data is read from.
A)True
B)False
To view all questions and flashcards withPage 12 click on the resource link above.
answers,
Chapter 11: Menu-Driven Programs
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/30372
Sample Questions
Q1) What is the structure that is needed to process a menu selection?
A)Sequence
B)Decision
C)Iteration
D)Loop
E)None of the above
Q2) Menu-driven programs should be broken down into ________ that perform
individual tasks.
A)loops
B)functions
C)tasks
D)modules
E)None of the above
Q3) Most menu-driven programs use a ________ that redisplays the menu after the
user selected action has been performed.
Q4) Menu-driven programs should be broken down into _________ that perform
individual tasks.
Q5) In the GUI program,the user can just _________on their choice using a mouse.
Q6) The _______ selection in the menu causes the loop with the menu to stop and end
the program. Page 13
To view all questions and flashcards with answers, click on the resource link above.
Chapter 12: Text Processing
Available Study Resources on Quizplus for this Chatper
31 Verified Questions
31 Flashcards
Source URL: https://quizplus.com/quiz/30373
Sample Questions
Q1) The isWhiteSpace library function returns True if its argument is displayed on the
screen using a white background color.
A)True
B)False
Q2) In pseudocode you can use the _________ library function to determine whether
a character is whitespace.
Q4) In pseudocode you can use the _________ library function to determine whether
a character is an alphabetic letter.
Q5) In pseudocode you can use the _________ library function to determine whether
a character is uppercase.
To view all questions and flashcards with answers, click on the resource link above.
Page 14
Chapter 13: Recursion
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/30374
Sample Questions
Q1) In a recursive algorithm,the computer completes the base case first and then works
on the recursive cases.
A)True
B)False
Q2) A recursive module is similar to a ________ in that it must have some way to
control the number of times it repeats.
A)Loop structure
B)Case structure
C)If-Then structure
D)If-Then-Else structure
E)None of the above
Q4) When setting up a recursive module,the part of the problem that can be solved
without recursion is known as the __________ case.
To view all questions and flashcards with answers, click on the resource link above.
Page 15
Chapter 14: Object-Oriented Programming
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/30375
Sample Questions
Q1) The mutator methods are sometimes called _________________.
A)getters
B)accessors
C)setters
D)private
E)None of the above
Q2) Each object that is created from a class is called a(n)_________ of the class.
Q4) What type of programming is centered on the procedures or actions that take place
in a program?
A)Object-oriented
B)Interactive
C)Procedural
D)Menu-driven
E)None of the above
Q5) The data contained in an object are known as the object's __________.
To view all questions and flashcards with answers, click on the resource link above.
Chapter 15: Gui Applications and Event-Driven
Programming
Available Study Resources on Quizplus for this Chatper
43 Verified Questions
43 Flashcards
Source URL: https://quizplus.com/quiz/30376
Sample Questions
Q1) Using an IDE,a window can be created by clicking on the desired item in the toolbox
and then clicking in the window to place it.
A)True
B)False
Q2) What type of interface displays a prompt,and the user types a command which is
then executed?
A)Command line
B)Command prompt
C)Command type
D)Command display
E)None of the above
Q3) GUI components have a set of _______________ that determine how the
component appears on the screen.
A)Rules
B)Properties
C)Logic
D)Procedures
E)None of the above
To view all questions and flashcards with answers, click on the resource link above.