Tagged: compare storage classes C

Compare Automatic, Register, Static and External Variables in C 2

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...

FREE C Cheatsheet - Speed Up Your C Programming.

FREE C Cheatsheet - Speed Up Your C Programming.

Download a 7-page free cheat sheet for easy and quick access to C Concepts, Snippets, and Syntax.

Thank you! Check you inbox and access your cheat-sheet