Algorithms and Programs Flashcards

(20 cards)

1
Q

What is an algorithm?

A

Algorithm is the step-by-step instructions followed to solve a problem.

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

In what forms, is an algorithm represented?

A

Flowchart and pseudocode

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

What is a flowchart?

A

A method of representing algorithms in pictorial form, depicting the steps and order to be followed to perform a task.

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

What is pseudocode?

A

A method of representing an algorithm using simple words and mathematical operators.

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

What does this symbol represent in flowchart?
rectangle with curves

A

Start or end

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

What does this symbol represent in flowchart?
rectangle

A

Process

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

What does this symbol represent in flowchart?
kite

A

Decision box

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

What is a trace table?

A

A table that records results from each step in an algorithm and values of variables every time it changes.

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

In what ways, is the understandability of an algorithm improved?

A

Using meaningful variable names and separating the complete logic into some modules.

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

How can you find out the purpose of an algorithm?

A

By analysing the algorithm step by step and using a trace table.

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

List an application where searching and sorting an algorithm is used.

A

Internet search engines.

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

List an application where route-finding algorithm is used.

A

Routing in networking.

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

What is stepwise refinement?

A

Stepwise refinement, also called top-down design, is the breaking down an outline solution into smaller steps until each step is detailed enough.

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

What is the difference between local and global variables?

A

Local variables are accessible within the subroutines only, whereas global variables are accessible throughout the program.

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

Define structure chart.

A

A tool to represent the modular structure of a program.

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

How is selection represented in a structure chart?

A

Selection in the structure chart is denoted using a diamond symbol.

17
Q

How is iteration represented in a structure chart?

A

Iteration in structure chart is denoted using a semi-circular arrow.

18
Q

What symbol is used to represent variables in a structure chart?

A

Arrow with a circular end

19
Q

What symbol is used to represent flag values in a structure chart?

A

Arrow mark with a solid round end.

20
Q

What does a double-headed arrow represent in structure charts?

A

Double-headed arrows represent variables that are updated within a module.