Can someone explain the difference between a static and const variable?
static
const
Simple and short answer is memory is allocated for static and const only once. But in const that is for only one value where as in static values may change but the memory area remains the same until the end of the program.