What is variable

Слайд 2

Rules to create variable

Rules to create variable

Слайд 3

Слайд 4

Data types

Data types

Слайд 5

Value and Reference

Value and Reference

Слайд 6

Stack and Heap

Stack and Heap

Слайд 7

Key difference Stack is a linear data structure whereas Heap is

Key difference

Stack is a linear data structure whereas Heap is a

hierarchical data structure.
Stack memory will never become fragmented whereas Heap memory can become fragmented as blocks of memory are first allocated and then freed.
Stack accesses local variables only while Heap allows you to access variables globally.
Stack variables can’t be resized whereas Heap variables can be resized.
Stack memory is allocated in a contiguous block whereas Heap memory is allocated in any random order.
Stack doesn’t require to de-allocate variables whereas in Heap de-allocation is needed.
Stack allocation and deallocation are done by compiler instructions whereas Heap allocation and deallocation is done by the programmer.
Слайд 8

Numeric types

Numeric types

Слайд 9

Description of some advanced types

Description of some advanced types