Storage class in C programming defines scope and lifetime of a variable and function. At the time of variable declaration we define both data type as well as storage class of a variable.
Static variables are declared with
static keyword. Static variables have an essential property of preserving its value across various function calls. Unlike local variables, static variables are not allocated on C stack. Rather, they get their memory in data segment of the program.
Local variables are variables declared within a function or more specifically say within a block.
Block is a sequence of statements grouped together inside a pair of curly braces
}. Since the first day of programming, you have been using blocks. For example - if...else block, loop block, function block etc.