Wk. 1-3 Review Flashcards

1
Q

What is a variable?

A

A named location in memory

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

How many bits are there in a byte?

A

8 bits

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

What is an example of a unitary operator?

A

Increment or decrement operator (x++ or x- -)

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

What is a function?

A

A named block of code

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

What is a block?

A

{ }

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

What is a local variable?

A

A variable declared within the function

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

What is the syntax of a variable declaration

A

Data type and then identifier

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

What is the name of a function heading and body?

A

The function implementation

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

What is the syntax of a function?

A

[return type] [function identifier] [formal parameter list]

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

What is the syntax for a formal parameter?

A

[data type] [parameter identifier]

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

What is a declared function called?

A

Function prototype

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

What is the syntax for the function call?

A

[function identifier] [function call operator] [arguments]

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

What is the difference in syntax between an argument and a formal parameter?

A

The formal parameter contains the data type specified

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

Do arguments that are passed to a formal parameter have to be a variable?

A

No, they can be literal values or expressions

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

What are the 3 runtime rules?

A
  1. When a function begins execution, space is allocated for its parameters and local variables.
  2. When a function returns, that space is released.
  3. Parameters are always initialized with their corresponding arguments.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a character constant?

A

A single character in single quotes

17
Q

A float has how many bytes?

A

At least 4

18
Q

What are the different kinds of ints?

A

Short -> int -> long -> long long