5 kafli

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

A. Lewis

. When searching within the list Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom which of the following entries will be found most quickly using the sequential search algorithm? A. Lewis B. Pat C. Tom

C. Process

Which of the following is an activity? A. Algorithm B. Program C. Process

B. Program

Which of the following is a representation? A. Algorithm B. Program C. Process

C. Assertions

Preconditions, postconditions, and loop invariants are examples of which of the following? A. Pseudocode B. Iterative structures C. Assertions D. Recursion

A. X < 5

Under the assumption that X takes on only integer values, which of the following is the termination condition for the following loop? repeat ( . . . ) until (X < 5) A. X < 5 B. X > 4 C. X > 5

B. X > 4

Under the assumption that X takes on only integer values, which of the following is the termination condition for the following loop? while (X < 5) do ( . . . ) A. X < 5 B. X > 4 C. X < 4

B. Pat

When searching within the list Lewis, Maurice, Nathan, Oliver, Pat, Quincy, Roger, Stan, Tom which of the following entries will be found most quickly using the binary search algorithm? A. Lewis B. Pat C. Tom

B. X < 8

Which of the following is a loop invariant at the point at which the test for termination is performed in the following loop structure? X <-- 3; repeat (X <-- X + 2) until (X > 5) A. X > 5 B. X < 8 C. X => 5 D. X <= 6

D. X <= 5

Which of the following is a loop invariant at the point at which the test for termination is performed in the following loop structure? X <-- 3; while (X < 5) do (X <-- X + 2) A. X > 5 B. X < 5 C. X => 5 D. X <= 5

D. Assignment statement

Which of the following is not a means of repeating a block of instructions? A. Pretest loop B. Posttest loop C. Recursion D. Assignment statement

A. Stepwise refinement

Which of the following is not a way of representing algorithms? A. Stepwise refinement B. Pseudocode C. Flowchart D. Programming language

B. X <--- 3; while (X < 5) do (x <-- X + 1)

Which of the following set of instructions defines an algorithm in the formal, strict sense? A. X <--- 3; while (X < 5) do (x <--- X) B. X <--- 3; while (X < 5) do (x <-- X + 1) C.X <--- 3; while (X < 5) do (x <-- X - 1)


Set pelajaran terkait

Income Statement - Purpose, Components, and Format

View Set

NASM CPT EXAM CHEAT SHEET + A FEW MORE

View Set

Nervous system- Health Alterations

View Set

Chapter 1 Body Cavities & Regions

View Set

Combinatorics, Probability, & Factorials

View Set

Chapter 27: Chest Injuries (Questions)

View Set