What are the advantages of auto variables?

1)The same auto variable name can be used in different blocks2)There is no side effect by changing the values in the blocks3)The memory is economically used 4)Auto variables have inherent protection because of local scope

Showing Answers 1 - 2 of 2 Answers

vinod

  • Feb 22nd, 2007
 

auto variable have initial value as garbage.
auto int and int are  one and the same.

  Was this answer useful?  Yes

the main advantage of auto variable is if we use auto variable in different block of our code with different value then it has not any sideeffect because it is automatically managed by the compiler .

  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