Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

The GNU C Programming Tutorial - Other storage classes

Node:Other storage classes, Previous:Static variables, Up:Storage classes



Other storage classes

There are three more storage class identifiers in C: auto, register, and typedef.

  • auto is the opposite of static. It is redundant, but is included in contemporary versions of C for backwards compatibility. All local variables are auto by default.
  • register is another outdated C storage class. Defining a variable as register used to store it in one of the computer's registers, a specific location on its processor chip, thereby making code using that variable run faster. These days, most C compilers (including GCC) are smart enough to optimize the code (make it faster and more compact) without the register keyword.
  • typedef allows you to define your own variable types. See More data types, for more information.

 
 
  Published under free license. Design by Interspire