What are storage class in c?

What are storage class in c?

The scope and lifetime of a variable or / and function within a C program is defined by storage class. There are four storage classes in C

auto - It is the default storage class for all variables and / or functions.

register - Allows for defining variables to store in CPU register instead of RAM. Unary operator is not applied for register variable.

static – The static storage class allows the updated variable values available for the next time when the function, in which the variable is defined , is invoked for the next time.

extern - It allows a global variable to be visible to all the program files / external files ( C programs).
C Interview Questions and Answers for Freshers
C interview questions and answers for freshers - Explain the keyword continue, How are decisions made using a switch keyword?, What is the K & R method to declare formal arguments in a function., Give one method for declaration of formal parameters
What are bitwise shift operators?
Bitwise shift operators - The bitwise operators are used for shifting the bits of the first operand left or right. The number of shifts is specified by the second operator...
Explain the use of bit fieild.
Packing of data in a structured format is allowed by using bit fields. When the memory is a premium, bit fields are extremely useful. For example:
Post your comment