---
title: "What are different storage class specifiers in C?"  
description: "What are different storage class specifiers in C?"  
author: "Hemant Patel"  
published: 2017-12-27  
updated: 2024-02-02  
canonical: https://answers.mindstick.com/qa/32107/what-are-different-storage-class-specifiers-in-c  
category: "technology"  
tags: ["c language"]  
reading_time: 2 minutes  

---

# What are different storage class specifiers in C?

What are different [storage](https://www.mindstick.com/articles/44749/self-storage-price-comparisons-and-more) [class](https://yourviews.mindstick.com/story/1037/cbse-class-12-result-declared-and-tanya-singh-topped-after-securing-500-500) specifiers in C?

## Answers

### Answer by Baishakhi Ghosh

## Overview:

**In the C programming language, carport class specifiers are watchwords that frame the degree and lifetime of factors.**

![What is storage classes in C with example? - Computer Notes](https://ecomputernotes.com/images/storage-classes-in-C.jpg)

####

#### There are 4 essential stockpiling style specifiers in C:

1. **auto:**

- For local variables, the default storage class is the automobile specifier.
- Factors announced with vehicles are regularly designated and deallocated when the block they're portrayed in is placed or left.

2. **register:**

- The compiler is informed by the register specifier that the variable must be stored in a register for faster access.
- It's a touch to the compiler and doesn't guarantee that the variable could be saved in a sign-in.

3. **static:**

- The static specifier has unmistakable implications in light of how far it's utilized:
- For neighboring factors: It holds its worth between capability calls and is instated best when.
- Regarding global variables: It restricts the scope of the variable to the file in which it is declared.

4. **extern:**

- The extern specifier is utilized to guarantee a worldwide variable that is depicted in each and every other report.
- It tells the compiler that the variable is defined elsewhere, allowing multiple documents to proportion the same global variable.

When dealing with variables in C programs, it is essential to have a solid understanding of these storage magnificence specifiers and use them appropriately. The decision of a carport polish influences factors comprising of the degree, lifetime, and openness of factors, impacting the program's lead and generally execution. It's urgent for C developers to comprehend the subtleties of carport examples to compose green and viable code.

Read more: [What are compound statements in C](https://answers.mindstick.com/qa/32112/what-are-compound-statements-in-c)


---

Original Source: https://answers.mindstick.com/qa/32107/what-are-different-storage-class-specifiers-in-c

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
