Memory Flashcards

1
Q

What is a decimal system?

A

a base-10 to represent numbers ( 0,1,2,3,4,5,6,7,8,9) and combining those to create larger numbers.

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

What is the Binary system?

A

A base-2 to represent values. Only values used in this system are 0 and 1

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

What is the Hexadecimal System

A

The hexadecimal system, aka base-16, is a much more concise way to express the data on a computer’s system. (0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f)

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

Why is hexadecimal more concise to express computer data?

A

Hexadecimal makes this mapping easy because a group of 4 binary digits (bits) is able has 16 different combinations, and each of those combinations maps to a single hexadecimal digit.

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

1 byte = ?? bits

A

1 byte = 8 byte

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

What is a nibble

A

a Nibble = 4 bits and equals one hexadecimal unit

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

How many bits is an integer

A

an integer is 32 bits (= 4 bytes)
The max value = 2.147.483.647 because this is the maximum number reachable with 32 bits

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

How many bits is a Long

A

a Long is 64 bits (= 8 bytes)
Max value = 9,223,372,036,854,775,807

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

How many bits is float

A

an float is 32 bits (= 4 bytes)

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

How many bits is a char

A

a char is 16 bits (=2 bytes)
It ranges from 0 to 65.535
can be used with uni-code

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

What is overflow?

A

Trying to store a larger number than is possible in a datatype.
For example 3.000.000.000 in an integer

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

What is a pointer in C

A

Adress to a memory location where an object is stored

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

How to check with C what the value in a memory adress is

A

& — If x is an int-type variable, then &x is a pointer-to-int whose value is the address of x.

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

What does ‘*’ do for a pointer in C

A

Go To memory adress - It “goes to the reference” and accesses the data at that memory location, allowing you to manipulate it at will.

This is just like visiting your neighbor. Having their address isn’t enough. You need to go tothe address and only then can you interact with them.

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

What is a call stack?

A

When you call a function, the system sets aside space in memory for that function to do its necessary work. Those chunck of memory we call stack frames or function frames.

Those function are stored in a call stack

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

What happens to the call stack when you use a function?

A

*These frames are arranged in a stack. The frame for the most recently called function is always on the top of the stack.

*When a new function is called, a new frame is pushed on to the top of the stack and becomes the active frame.

*When a function finishes its work, its frame is popped off of the stack, and the frame immediately below it becomes the new, active, function on the top of the stack. This function picks up immediately where it left off.

17
Q

What is stack overflow?

A

What is stack overflow? A stack overflow is a type of buffer overflow error that occurs when a computer program tries to use more memory space in the call stack than has been allocated to that stack.

18
Q

What is Heap memory?

A

Heaps are memory areas allocated to each program. Memory allocated to heaps can be dynamically allocated, unlike memory allocated to stacks.

19
Q

What is a Memory Leak?

A

A memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in a way that memory which is no longer needed is not released

20
Q

Where is the Heap en Stack memory in your PC

A

in the RAM memory
Random Access Memory

21
Q
A