36 day

 Storage classes

1. aute

This is the default storage class for all the variables declared inside a function or a block. Hence, the keyword auto is rarely used while writing programs in C language. Auto variables can be only accessed within the block/function they have been declared and not outside them (which defines their scope). Of course, these can be accessed within nested blocks within the parent block/function in which the auto variable was declared.
However, accessing auto variables outside their scope using pointers to their exact memory location is unsafe and results in undefined behavior. Auto variables are also assigned a garbage value by default when they are declared.
Likewise, auto keyword is not used in front of functions as functions are not limited to block scope.

Comments

Popular posts from this blog