Structured program development Flashcards

1
Q

Algorithm

A

A procedure for solving a problem in terms of the ordered actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Pseudocode

A

Developing an algorithm using everyday enlgish.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Sequential execution

A

When statements are normally executed one after another in order in which they’re are written.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Transfer of control

A

A C statement that allows you to execute a statement that is farther down the source code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

All programs can be written in terms of what?

A

Sequence (process), selection (if), and iteration (loop) control structures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Flow chart

A

A graphical representation of an algorithm.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Diamond symbol

A

Indicates that a decision is to be made.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

If

A

Single selection statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

If….else

A

Double selection statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Case (switch)

A

Multiple selection statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 3 types of iteration statements?

A

1) While loop
2) Do….while loop
3) For loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Nesting

A

Allows you to connect multiple control statements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Decision symbol (rhombus) contains what?

A

An expression, such as a condition, that can either be true or false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

If decision statement evaluates to 0, it is?

a. True
b. False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

If decision statement evaluates to non zero, it is?

a. True
b. False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

If statement is single entry and how many exits?

A

Single

17
Q

C provides which operator that is closely related to the if….else statement?

A

Conditional operator

?:

18
Q

The conditional operator is C’s only what operator and why?

A

Ternary operator because it has three operands.

grade >= 60 ? puts(“Passed”) : puts(“Failed”).

19
Q

A set of statements contained within a a pair of braces is called what?

A

Compound statement or a block

20
Q

An uninitialized variable contain a what value?

A

“Garbage” value because it uses the last stored value in the memory location reserved for that variable.

21
Q

Sentinel value is also called what?

A

signal value, dummy value, or a flag value and it indicated the “end of data entry”.

22
Q

The type float represents what kind of numbers?

A

Numbers with decimal points called floating point numbers.

23
Q

When two integers are divided, any fractional part of the result is what?

A

truncated (lost).

24
Q

To prevent a rational expression from being truncated you may use what?

A

unary cast operator (float).

25
Q

Unary operator takes how many operands?

A

one

26
Q

In general, any integer variable that should store only non-negative values should be declared with what?

A

Unsigned before the integer type.