What is the difference between auto and register storage class? when we use it in real time?

Questions by bajjuri.thirupathi

Showing Answers 1 - 2 of 2 Answers

Auto storage class: 
                               
                               If we declare a variable without any storage class, then it will be consider as auto storage class.         We will call this type of variable as local variables also.
                                When we define a variable it will allocate memory in stack segment of processor.
                                The processor accessing time is little bit slow comapre to register storage class.
                                By default variable will be created in this auto class.
Register storage class:
                               when we declare a variable with register  storage class it will try to allocate the variable in registers of the processor. variable access is very fast. We can declare oftenly accessing variable  as register.
                              

  Was this answer useful?  Yes

div_han

  • Mar 13th, 2007
 

Apart from the above mentioned ones, the maximum number that could be stored in registers depends solely on the register size. The memory cannot be dereferenced by an 'addressof' operator for register variables.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions