Auto variables are stored in memory and their default value is a garbage value. Register variables are meant to be stored in processor registers.
for instance if we write register int i; then i should be stored in a register. it may or may get the place in a register depending upon whether there are sufficient registers available or not because in microcomputers there are usually 14 to 16 registers and they may be engaged in some other work.
also one should remember that these registers are 16 bit so these statements should be avoided register float i , register double j . the compiler wont show any error and will take them as auto.
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.