95下計概期末考 蘇國

95下計概期末考 蘇國

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
National Taiwan University Introduction to Computer Science _______________________________________________________________June 20, 2007 Your Name:___________________ Your Student ID:___________________ Guidelines for version C: You can use a calculator without memory function Do not un-staple the exam Show all your work to receive partial credit even you are unsure the final answer Max 2 hours I. Choice Questions (40 pts, 2 pts per answer) 1. Which of the following set of instructions defines an algorithm in the formal, strict sense? (A) X 3; (B) X 3; (C) X 3; (D) all of above while (X < 5)do while (X < 5) do while (X < 5) do (X X) (X X + 1) (X X - 1) 2. 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 (D) Oliver 3. The insertion sort algorithm is an example of an algorithm in which of the following classes? (A) Θ (lg n ) (B) Θ ( n ) (C) Θ ( n lg n ) (D) Θ ( n 2 ) 4. Which of the following does not require a Boolean structure? (A) If-then-else statement (B) While loop statement (C) Assignment statement (D) For loop statement 5. Which of the following is ignored by a compiler? (A) Control statements (B) Declarations of constants (C) Procedure headers (D) Comment statements 6. Which of the following statements is not a resolvent of the following clauses?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

95&auml;&cedil;‹&egrave;&uml;ˆ&aelig;&brvbar;‚&aelig;œŸ&aelig;œ&laquo;&egrave;€ƒ &egrave;˜‡&aring;œ‹

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online