Fundamentals of Programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a variable?

A

An item of data, that is referenced to by a variable name and whose value can change during running.

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

What is a data type?

A

Determines what sort of data is being stored and how it will be handled by the program.

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

What is a memory address?

A

A specific location in memory where data or instructions are stored.

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

What is assignment?

A

The process of giving a value to a variable/ constant.

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

What is a constant?

A

An item of data whose value doesn’t change.

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

Why is it important to use meaningful names?

A

Helps trace bugs.
Allow other programmers to follow your code.

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

What is debugging?

A

The process of finding and correcting errors in a program.

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

What is declaring?

A

When you define variables in terms of their name and data type before using them in your program.

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

What is an integer?

A

Any whole number.

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

What is a real/ float?

A

A number that has a fractional part.

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

What is a string?

A

Stores multiple characters

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

What is a Boolean?

A

True/ False

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

What is a character?

A

An individual character.

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

What is date/time?

A

Stores data in a format easily identified as date/time.

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

What is a pointer/ reference?

A

References a memory location in the computer.

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

What is an array?

A

A set of related data items stored under a single identifier.

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

What is a element?

A

A single value within a set or list.

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

What is a record?

A

One line of a text file with multiple different data types.

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

What are built-in data types?

A

Data types provided with the programming language.

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

What are user-defined data types?

A

Users own data types, typically a combination of built-in data types.

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

What are the three programming constructs?

A

Sequence
Selection
Iteration.

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

What is sequencing?

A

Making sure every line of code is executed in the correct order.

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

What is syntax?

A

Rules on how words are used in a given programming language.

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

What is selection?

A

The principle of choosing what action to take based on a certain criteria.

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

What is nesting?

A

Instructions within instructions.

26
Q

What is iteration?

A

Repeating processes until a condition is met.

27
Q

What is definite iteration?

A

Repeating a certain number of times.

28
Q

What is indefinite iteration?

A

Repeated until an event happens.

29
Q

What are arithmetic operations?

A

Mathematical operations.

30
Q

What are relational operations?

A

Comparisons between two data items.

31
Q

What are Boolean operations?

A

Those which result in True/ False.

32
Q

What are string-handling functions?

A

Length, position, substring, concatenation.

33
Q

What is a character code?

A

Binary representation of a particular character.

34
Q

What are subroutines?

A

A named block of code that carries out a specific task.
Self-contained with a unique identifier.

35
Q

What are functions?

A

Subroutines that return a value.

36
Q

What are the advantages of using functions/ subroutines?

A

Easier to understand code
Easier to test and debug
Allows collaboration
Prevents rewriting code
Easy to alter one version of a function

37
Q

What is functional programming?

A

A paradigm that uses functions to create programs.

38
Q

What is a parameter?

A

A variable that identifies the data you want a subroutine to take in and use.

39
Q

What are arguments?

A

Actual data being passed into a subroutine.

40
Q

What is a block interface?

A

A block of code that specifies the type and characteristics of data being passed in.

41
Q

What is a local variable?

A

A variable only available in specific functions and subroutines.

42
Q

What is a global variable?

A

A variable that’s available anywhere in the program.

43
Q

What are advantages of local variables?

A

Cannot accidentally change the value elsewhere.
Can use a variable name in a different sections and both are completely separate.
Free’s up memory as it is removed once used.

44
Q

What are catch blocks?

A

Blocks of code that are triggered in response to specific errors.

45
Q

How to catch blocks work?

A

1) Error thrown so subroutine is paused
2) Current state of subroutine saved
3) Catch block executed which handles the error.
4) Subroutine picks up from where it was saved.

46
Q

What are procedural programming languages?

A

Where the programmer specifies the steps that must be carried out in order to achieve a result.

47
Q

What are imperative programming languages?

A

Based on giving the computer commands or procedures to follow.

48
Q

What are hierarchy charts?

A

A diagram that shows the design of a system from the top down.

49
Q

What is the top-down approach?

A

When designing a system you start at the top procedure and work down to smaller and smaller subroutines.

50
Q

What is a module?

A

A self-contained part of the program that ca be worked on in isolation.

51
Q

What is a flowchart?

A

A diagram using standard symbols that describes a process or a system.

52
Q

What does an oval represent on a flowchart?

A

Start/ Stop

53
Q

What does an rectangle represent on a flowchart?

A

Process

54
Q

What does an parallelogram represent on a flowchart?

A

Input/ Output

55
Q

What does an diamond represent on a flowchart?

A

Decision

56
Q

What is a system flowchart?

A

A diagram showing individual processes within a system.

57
Q

What is pseudo-code?

A

A way of writing code that shows the purpose of the program without using constructs or syntax.

58
Q

What is a dry-run?

A

The process of stepping through each line of code to see what will happen before the program is run.

59
Q

What is a trace table?

A

A method of recording the result of each step that takes place when dry-running code.

60
Q

What are the advantages of dry-running?

A

Identifies errors before time is spent coding it.

61
Q

What is a breakpoint?

A

Stops the execution of a program so the programmer can check the variables at that point.