Storage Classes



Storage Classes

-        A variable always have data type(int,float etc) but they also have a storage class or we can say a variable always need data type as well as storage class.
-        As we had seen many examples before, but we did not use storage classes there, because variables also have default storage classes. So if we do not mention storage class, compiler will assume default.
-        In computer we use two types of memory
1.    Internal Memory 
2.    CPU Registers.
-                   It is the variable’s storage class that determines in which of these two locations the value is stored.

What is use of storage class?

-        To know about life of variable
-        To know about scope of variable
-        To store variables in memory or registers
-        To know initial value of variable, if we did not assign default value.

Types of Storage classes:
     There are 4 types of storage class

Comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

Popular posts from this blog

Disable or enable proxy for Internet explorer or Chrome

chm viewer unable to show contents

3 prisoners and 5 hats puzzle