Let's see these declarations one-by-one.
In C, auto means "not static". Usual local variables are not static by defualt.
There's literally no difference between a local
auto int a;
A programmer uses the "register" keyword for a variable to hint the compiler that this variable is going to be frequently used, and to optimise performance the compiler should keep it in the register.
However, it is perfectly legal for the compiler to flat-out ignore this request, and depend on its judgement on what to put in the registers.
Also, you can't take the address of a register int. (Statement 2)
Hence, using register keyword is unadvisable, as the compiler can ignore it, and you'd also lose the
We all know what this is. A static variable is stored in the Runtime environment right at the beginning of the process's execution. Static ints can only be initialised once, and if not initialised by the programmer, they implicitly get initialised to 0 by the compiler.
Note: Global variables too get initialised to 0 if not explicitly initialised by the programmer.
The "const" keyword would keep the value invariable / constant. In other words, it would implement read-only behaviour.
Hence, only for "register int a;" the given declaration would cause a problem, as it's illegal to fetch its address. Option C