-->

Welcome to Easy Tutorial

.

About Us

WE ARE CREATIVE

.

.

1254

HAPPY CLIENTS

1424

COMPLETE PROJECT

2136

CUP OF COFFIE

15

AWARDS

img

Huzaifa Ansari

Web developer

Hi i am Huzaifa Ansari ,your's teacher .

img

Huzaifa Ansari

Blogger

I am also a blogger.

img

Huzaifa Ansari

Freelancer

I am freelancer.

Blog

LATEST FORM Blog

Showing posts with label C programming language. Show all posts
Showing posts with label C programming language. Show all posts

Storage classes in c





Storage classes in c

Storage classes in c
Storage classes in c



Storage Classes in C  are used to describe the features of a variable/function. These features basically include the scope, visibility and life-time which help us to trace the existence of a particular variable during the runtime of a program.

So, storage class signifies 4 things:

1.     Storage/ Location : where the variable is stored.
2.     Default value : what value would it hold if it is not initialized.
3.     Scope : where the variable is would be available.
4.    Life : how long would the variable be available. 

There are four type of storage classes in C.

1.     Automatic storage class.

2.     Register storage class.

3.     Static storage class.

4.     External  storage class.



Automatic storage class.

Keyword : auto
Storage : Memory.
Default value : garbage (unpredictable value).
Scope: local to block.
Life: till control is in the block in which variable is defined .

Register storage class.

Keyword : register.
Storage : CPU register (internal memory of microprocessor.).
Default value : garbage .
Scope: local to block.
Life: till control is in the block in which variable is defined.

Static storage class.

Keyword : static.
Storage : Memory.
Default value : zero/0
Scope: local to block.
Life: till the execution of program does not end.

External storage class.

Keyword : extern.
Storage : Memory.
Default value : zero/0.
Scope: global (whole the program).
 Life: till the execution of program does not end.

When we storage classes?

Register -for frequently used variable.
Static – if variable is to live across function calls.
External – if variable is required by all functions.
Automatic – All storage class.

 
Storage classes in c,storage class ,
Storage classes in c




Visit Our Website Link Here:https://www.digitalakhbar.co.in/
https://www.digitalakhbar.co.in/

           < previous page                                                                             Next page >


Variables


Variables

Those value which does not change during execution of program known as variables.


A variable is nothing but a name given to a storage area that our programs can manipulate.

A variable definition tells the compiler where and how much storage to create for the variable.

 A variable definition specifies a data type and contains a list of one or more variables of that type as follows.

syntax :

type variable list;

Here, type must be a valid C data type including char, w_char, int, float, double, bool, or any user-defined object; and variable_list may consist of one or more identifier names separated by commas.




Visit Our Website Link Here:https://www.digitalakhbar.co.in/


       < previous page                                                                             Next page >




Index of C programming



INDEX
Address

Contact Info

You can contact us!

Address:

Industrial Area,Khalilabad,Sant Kabir Nagar,Uttar Pradesh

Phone:

+91 ........

Email:

addaeducation07@gmail.com