Coding - Practical 6 Flashcards

1
Q

What is the code to print the address of a variable (e.g. wave)?

A

std::cout &laquo_space;“Address of variable : “ &laquo_space;&wave &laquo_space;“\n”;

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

What symbol is used to get the address of the variable?

A

&

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

What are shared variables?

A

Shared variables are variables that can be accessed between functions. Shared variables also retain their value while the program continues to run.

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

What is an address?

A

An address is where a variable lives (in memory) - each variable has its own address.

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