Q:

WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND REGISTER VARIABLE IN C?

belongs to collection: C INTERVIEW QUESTIONS AND ANSWERS

0

WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND REGISTER VARIABLE IN C?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Storage class of all variables are auto by default unless we specify a variable is register or static or extern in C program.

  • Both auto variable and register variable are local variables. Register variables are stored in register memory. Whereas, auto variables are stored in main CPU memory.
  • Register variables will be accessed very faster than the normal/auto variables since they are stored in register memory rather than main memory.
  • But, only limited variables can be used as register since register size is very low. (16 bits, 32 bits or 64 bits)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C INTERVIEW QUESTIONS AND ANSWERS

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND S... >>
<< WHAT VALUE IS ASSIGNED TO THE BELOW VARIABLES?...