C Storage Classes

Ace your homework & exams now with Quizwiz!

Extern

Storage class that is used to give a reference of a global variable that is visible to ALL the program files. When used, the variable cannot be initialized however, it points the variable name at a storage location that has been previously defined.

Register

Used to define local variables that should be stored in a register instead of RAM. This means that the variable has a maximum size equal to the register size (usually one word) and can't have the unary '&' operator applied to it (as it does not have a memory location).

Auto

Default storage class for all local variables.

Static

Instructs the compiler to keep a local variable in existence during the life-time of the program instead of creating and destroying it each time it comes into and goes out of scope. Therefore, making local variables static allows them to maintain their values between function calls.


Related study sets

Midterm 2 - ACC 358C (Ch. 4-6, 15)

View Set

Pathophysiology Exam 1 Questions (Mentimeter)

View Set

The synthesis and degradation of nucleotides

View Set

Combo with "Mike Meyer's Guide to Network+ Chapter 5 Modern Ethernet" and 2 others

View Set

Chapter 9 Life Policy Provisions

View Set

Consumer Ed, Chapter 12, Savings

View Set

ADN 106 exam 3: topic: Allergic disorders

View Set