Vous êtes sur la page 1sur 13

All the following are simple data types EXCEPT_________________ Character Integer Real String +

In flowcharting, which basic operation is a rectangle used to represent? Decision Input/output Process/assignment+ Storage

Which of the following is NOT a significant part of a simple problem? Input Processing Output Solution+ During problem decomposition, expected results are documented in the _______ column in the defining diagram. Input Processing Output+ Storage

Developing and representing algorithms are included in the ______ step in the problem solving process. First Third Fourth+ Last

In which one of the following processes is a defining diagram used? Problem diagramming Problem portioning+ Program definition Stepwise refinement

All the following are true about variables and constants EXCEPT that_________ They have names called identifiers Their names refer to an area of memory Their names are created by the programmer They can be used interchangeably+

Which of the following is an incorrect variable name? 1stchoice + Firstchoice firstChoice

FIRSTCHOICE

A________is a named location in memory, the value of which may remain fixed. Constant+ Literal Half-constant Variable

Which data type is MOST appropriate for storing a value representing the weight of a newborn child? Character Integer Real+ String

Which statement represents a characteristics of an algorithm? Has a precise number of steps+ Always represent a part of a solution Is always structured Relates to programming, only.

A value has been input. It must be doubled and the result stored. The initial value and the result must be displayed. Which algorithm segment is correct? Double value, print value Double value, print value, print result Double value, store result , print product

Double value, store result, print value, print result+

Which condition will determine if n is of a higher value than ten? n>=10 n>10 + n<=10 n<10

Consider the following: Five numbers are to be input( under the control of a loop). The biggest number must be determined and output. How many columns are necessary for the required trace table? 6 5 3 2+

The number of_______ in an algorithm determines the number of rows in a trace table? Constants Calculations Passes+ Variables

The AND in the program statement X =5 AND Y < 7 is an example of a (n) __________ operator. Arithmetic Boolean+

Comparison Logical

Pseudocode is a __________ method of representing algorithms. Graphical Textual+ Verbal Visual

QUESTIONS 78-80 ARE BASED ON THE FOLLOWING NARRATIVE: Five numbers are input using a for loop. As each is entered, it is doubled. The results are stored separately,How many columns are required for a trace table for the algorithm? 2 3+ 4 5 How many values should be in the first row of the trace table? 2 3+ 4 5

How many values should be in the second column of the trace table? 2

3 4 5+

Problem partitioning is a technique used to __________ Determine the most efficient solution Refine a problem that has two or more parts Identify which part of a problem can be solved Decompose a problem into its component parts+

A defining diagram usually has ____________ columns. 2 3 4 5+

The third column in a defining diagram lists Inputs Processes+ Outputs Storage

Which statement is used to determine if the value of x is the same or less than the value of y? If x<y

If x<=y If .>y + If x >=y Stepwise refinement is a technique use in ______________________ Flowcharting Top-down design+ Problem partitioning Trace table construction

A __________ is a named location in memory, the value of which changes during program execution. Constant Literal Sentinel Variable+

Which of the following is NOT an activity undertaken during the initial step of the problem solving process? Problem partitioning Algorithm development+ Problem decomposition Construct defining diagram

Which data type is Most appropriate for storing a value representing a cardinal point on a compass? Character+

Integer Real String

Which statement is true of algorithms? Are always simple Must be documented May be expressed in various ways + Must be represented by pseudocode

Which of the following descriptions are characteristics of an algorithm Precise Ambiguous Terminable Unambiguous i and ii i,ii and iii i,ii and iv i,iii and iv +

An algorithm specifies the flow of control from one _______ to another. Structure Values Process+ Variable

A program is to be developed to accept TWO numbers and calculate the sum and average. Each input value and each result should be accessible after the calculations. How many variables are needed? 5 4+ 3 2

Which algorithm will accept, add, then calculate and output the mean of TWO numbers? Sum= n1+n2 Read n1 ,n2 Write sum Write avg Sum = n1+n2 Read n1,n2 Sum = n1+n2 Write avg Read n1,n2 Sum = n1+n2 Avg = sum/2 Write avg + Read n1,n2 Sum = n1 + n2/2 Avg =sum/

Write avg

The number of _____________ in an algorithm determines the number of rows in a trace table? Constant Calculations + Passes Variables

Which statement is used to determine and output the bigger of two unequal numbers? If n1 > n2 THEN Write n2 ELSE Write n1 If n1< n2 THEN write n2 If n1 > n2 THEN write n2 If n1< n2 THEN write n1 ELSE write n2 +

Which of the following statements about flowcharts is UNTRUE? More concise than pseudocode +

Gives a good view of the structure of the logic Logic easier to follow than that of pseudocode Easier to visualize connections between statements

In flowcharting, which basic operation is a diamond used to represent? Decision Input/output Process/assignment+ Storage

Which of the following statements about decisions is untrue? Testing a value is also called making a decision In flowcharting, a diamond containing a question represents a decision Some decisions evaluate to both yes and no+ A decision may include a simple or a compound condition

Programs accept data as input, produce output, and sometimes carry out numerous assignment operations. Which of the following statements is UNTRUE? Some programs used the equal sign as a shorthand expression for assignment statements Whatever operation is performed to the right of the equals sign results in a value that is placed in a memory location to the left of the equals sign Whatever operation is performed to the left of the equals sign results in a value that is placed in a memory location to the right of the equals sign+ Assignment replaces whatever value was originally in the memory location

A trace table consists of _______ as column headings and ____________ in the

cells, one row for each pass. Variables, identifiers Identifiers, values+ Values, identifiers Identifiers, variables

Vous aimerez peut-être aussi