Core Concepts Flashcards

1
Q

What are the types of int?

A

+/-, +
short, ushort 16bit
int, uint 32bit
long, ulong 64bit

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

What are the types of float?

A

float 32bit,
double 64bit,
decimal 128bit

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

What is the stack vs heap?

A

Stack (fast memory) holds: Int, float.. Pointers to larger items

Heap (slower memory) holds: Strings, Classes, Variables, Arrays

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

How do the stack vs heap operate?

A

Stack is for static memory allocation, which allocates when compiled

Heap is for dynamic memory allocation, which allocates during run-time

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

What is LIFO vs FIFO?

A

Last In First Out, stack

First In First Out, queue

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

What is a class vs struct?

A

Class is a reference type: Copying points from stack to same object on heap
i.e i=0 i=j j=1, j & i now = 1
Struct is a value type: Copying creates another instance on stack

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