What are the main difference between const and static?
Values defined with const can be copied to wherever they are needed, whereas static values remain in a fixed place in memory.
They can be used interchangeably, but const only supports primitive types while static must be used for structs and user-defined types.
They can be used interchangeably, but const values are compiled at compile time.
Values defined with const live in the stack, while static values live on the heap.