Compare Automatic, Register, Static and External Variables in C
Let us understand the difference between various storage classes in C programming language. Below is the table that will show difference between Automatic, Register, Static and External Variables storage Classes in C. Feature Automatic Variable Register Variable Static Variable External Variable 1 Keyword Used auto register static extern 2 Storage Memory CPU registers Memory Memory 3 Default initial value Garbage Value Garbage Value Zero Value Zero Value 4 Scope Local to the block in which the variable is defined Local to the block in which the variable is defined Local to the block in which the variable is defined Global...