Problem Solving and Programming Flashcards

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

What is the purpose of an IDE

A

A program which provides a set of tools to make it easier for programmers to write, develop and debug code.

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

What is the purpose of stepping

A

This allows you to monitor the effect of each individual line of code by executing a single line at a time.

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

What is the purpose of variable watch

A

Sometimes used to pinpoint errors, this is a useful feature to observe how the contents of a variable change in real-time through the execution of a program.

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

What is the purpose of breakpoints

A

IDEs allow users to set a point in the program at which the program will stop. This can either be based on a condition or set to occur at a specific line. This can help to pinpoint where an error is occurring.

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

What is the purpose of a source code editor

A

The editor aims to make the coding process easier by providing features such as autocompletion of words, indentation, syntax highlighting and automatic bracket completion.

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

What is the purpose of debugging tools

A

Some IDEs also provide run-time detection of errors with a guide as to where in the code they are likely to have occurred through line numbers and highlighting.

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

What are parameters

A

The values passed into a function

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

What are procedures/ functions

A

Procedures and functions are both named blocks of code that perform a specific task.

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

What is the difference between procedures and functions

A

Procedures do not have to return a value; functions must always return a value.

Procedures can return multiple values whereas a function must return one, single value

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

What happens when we pass a parameter by value

A

When a parameter is passed by value, the value created for the subroutine being called is a copy of the original. Once it is passed, the parameter is held in a separate memory location, so is only available to that subroutine meaning the copy is now a local variable of that subroutine

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

What happens when we pass a parameter by reference

A

When a parameter is passed by reference, a pointer that contains the memory address of the original variable is created

This means that any changes to that value from within the called subroutine will also affect the original variable

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

What is a variable

A

Identifier of a memory location used to store data

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

What is meant by the scope

A

The range of statements/ procedures/ functions/ methods that a variable is valid for

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

What is a global variable

A

A type of variable, usually defined at the start of a program, where the variable can be used everywhere in the program

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

What are local variables

A

A variable that is only valid within the procedure/ function/ sub routine in which they are declared

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

What happens if a local variable has the same name as a global variable

A

The local variable will take precedence over the values in the global variable

17
Q

What is the purpose of translators in an IDE

A

Converts the users high level code into executable machine code

18
Q

What is the purpose of a run-time environment in an IDE

A

It is software that supports the execution and running of programs, so developers can run their code during development