0% found this document useful (0 votes)
15 views17 pages

Introduction To Algorithms MCQ PDF

Introduction to Algorithms MCQ PDF available on Quizplus.com. The resource URL is https://quizplus.com/study-set/1537-starting-out-with-programming-logic-and-design

Uploaded by

duz8l5k15z
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)
15 views17 pages

Introduction To Algorithms MCQ PDF

Introduction to Algorithms MCQ PDF available on Quizplus.com. The resource URL is https://quizplus.com/study-set/1537-starting-out-with-programming-logic-and-design

Uploaded by

duz8l5k15z
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

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

algorithmic problem-solving techniques and their applications in computer science. The

course covers essential topics such as algorithm analysis, recursion,

divide-and-conquer strategies, sorting and searching algorithms, dynamic

programming, and graph algorithms. Emphasis is placed on designing efficient

algorithms, understanding their computational complexity, and applying them to solve

real-world problems. Through hands-on exercises and projects, students gain practical

experience in implementing algorithms and developing critical thinking skills necessary

for advanced study in computer science.

Recommended Textbook
Starting Out with Programming Logic and Design 3rd Edition by Tony Gaddis

Available Study Resources on Quizplus


15 Chapters
655 Verified Questions
655 Flashcards
Source URL: https://quizplus.com/study-set/1537

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

Q2) Data is not recorded magnetically on a(n)____________,but is encoded as a


series of pits on the disk surface.
A)disk drive
B)floppy disk
C)USB drive
D)optical disk
E)None of the above
Answer: D

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

Q4) USB drives store data in a special type of memory known as


____________________.
Answer: Flash memory

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

Q5) Programmers use operators to create __________________ expressions to


perform calculations and return a value.
Answer: mathematical

To view all questions and flashcards with Page


answers,
4 click on the resource link above.
Chapter 3: Modules
Available Study Resources on Quizplus for this Chatper
48 Verified Questions
48 Flashcards
Source URL: https://quizplus.com/quiz/30364

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

Q3) A program's code tends to simpler and easier to understand when it is


____________.
Answer: modularized

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

To view all questions and flashcards with Page


answers,
5 click on the resource link above.
Chapter 4: Decision Structures and Boolean Logic
Available Study Resources on Quizplus for this Chatper
44 Verified Questions
44 Flashcards
Source URL: https://quizplus.com/quiz/30365

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.

Q4) What two logical operators perform short-circuit evaluation?


A)NOT and OR
B)AND and OR
C)AND and NOT
D)All of the Above
E)None of the Above

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

Q2) A(n)__________________ loop continues to repeat until the program is


interrupted.

Q3) To ___________ a variable means to decrease its value.


A)Negate
B)Increment
C)Initialize
D)Decrement
E)Reference

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.

To view all questions and flashcards with Page


answers,
7 click on the resource link above.
Chapter 6: Functions
Available Study Resources on Quizplus for this Chatper
44 Verified Questions
44 Flashcards
Source URL: https://quizplus.com/quiz/30367

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

Q2) The priming read is needed when a pretest loop is executed.


A)True
B)False

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.

Q2) Declaring a two-dimensional array requires _______ size declarators.

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

Q3) When a piece of data is written to a file,it is copied from a variable in


____________ to the file.
A)cyberspace
B)RAM
C)flash memory
D)All of the above
E)None of the above

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.

Q3) Assuming the following variable declaration,


Declare String str = "Miami"
which of the following pseudocode statements changes the variable's contents to "Mia"?
A)delete(str, 3, length(str))
B)delete(str, 3, 4)
C)Set str = str - "mi"
D)Set str[0] = "Mia"
E)None of the above.

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

Q3) Which of the following can be solved with recursion?


A)Finding the greatest common divisor
B)Binary search
C)The Fibonacci Series
D)None of the above
E)All 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.

Q3) There are primarily three methods of programming in use today:


procedural,recursive,and object-oriented.
A)True
B)False

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 __________.

Q6) A ________ is the 'blueprint' of the Page


object16that is created from it.

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

Q4) The ___________________ interface is a test-based environment.


Page 17

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

You might also like