Use static storage class only if you want the variable to persist between different function calls.
Use register storage class for only those variables that are being used often in a program.A typical application of register storage class is loop counters,which gets used a number of times in a program.
Use extern storage class for only those variables that are being used by almost all the functions in the program.This would avoid unnecessary passing of these variables as arguments when making a function call.
If you don’t have any of the express needs mentioned above,then use the auto storage class.Most of the times,we use the auto variables.