chtp5_03-TIF-Beta - 3.1Introduction 3.2Algorithms 3.1...

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

View Full Document Right Arrow Icon
3.1  Introduction 3.2  Algorithms 3.1 Specifying the order in which statements are to be executed in a computer program is called (a) an algorithm (b) transfer of control (c) program control (d) pseudocode ANS: (c) 3.2. The two key attributes of an algorithm are: a) actions and start activity b) flow and order of flow c) actions and order of actions d) flow and start activity ANS: (c) 3.3  Pseudocode 3.3 Which of the following is true of pseudocode programs? (a) they are executed by the computer (b) they help the programmer “think out” a program (c) they include definitions and all types of statements (d) all of the above are false ANS: (b) 3.4 Pseudocode does not include __________. (a) definitions (b) input/output (c) algorithms (d) control structures ANS: (a) 3.5. Which statement is false? a) Pseudocode is an artificial and informal language that helps programmers develop algorithms. b) Pseudocode is similar to everyday English. c) Pseudocode is an actual programming language.
Background image of page 1

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

View Full DocumentRight Arrow Icon
d) Pseudocode programs are not actually executed on computers. ANS: (c) 3.6. Which statement is false? a) Pseudocode helps the programmer “think out” a program before attempting to write it in a programming language such as C. b) Pseudocode programs consist purely of characters so programmers may conveniently type pseudocode programs into a computer using an editor program. c) A carefully prepared pseudocode program is only a beginning; it still takes a tremendous amount of work to convert a pseudocode program into a C program. d) Pseudocode consists only of action statements. ANS: (c) 3.4  Control Structures 3.7 Which of the following encompasses the other three? (a) sequence structure (b) repetition structure (c) control structure (d) selection structure ANS: (c) 3.8 In a flowchart of an algorithm, what is the shape of the decision symbol ? (a) circle (b) rectangle (c) diamond (d) oval ANS: (c) 3.9 Which of the following is a repetition structure? (a) if (b) if…else (c) do…while (d) switch ANS: (c) 3.10 How many types of control structures exist in C? (a) 3 (b) 7 (c) 5 (d) 2 ANS: (a)
Background image of page 2
3.11. Normally, statements in a program are eexecuted one after the other in the order in which they are written. This is called __________ execution. a) inline b) seeking c) ordered d) sequential ANS: (d) 3.12. Various C statements enable the programmer to specify that the next statement to be executed may be other than the next one in sequence. This is called __________. a) change of order b) instruction skipping c) transfer of control d) rerouting ANS: (c) 3.13. Bohm and Jacopini’s work demonstrated that all programs could be written in terms of only three control structures, namely sequence, __________ and repetition. a) selection
Background image of page 3

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

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

This note was uploaded on 02/13/2011 for the course PHYSIC 102 taught by Professor Titov during the Spring '11 term at Yeditepe Üniversitesi.

Page1 / 12

chtp5_03-TIF-Beta - 3.1Introduction 3.2Algorithms 3.1...

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

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