What are Storage Classes in C ?

Answer Posted / vijay r15

storage class is an
attribute that changes
the behaviour of a
variable

There r 4types of
storage classes.They
are
auto
static
extern
register

auto- auto is the
default var type.
ex int x=1 and auto
int x=1 both r same

static- static
variable is a
variable,with in the
scope when it reaches
the initialization it
blindly igores and
hold the updated value

register-reg var tells
the compiler that the
variable will be
heavily used.It is
stored in cpu register

extern- extern var
tells that they have
allocated space in
some other program.
But just using here.
We cant initialize
using extern

with thanks and
regards,
vijay r15,
raj.Vijay55@gmail.Com

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a c program to find the sum of five entered numbers using an array named number

1610


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1506


Is null valid for pointers to functions?

594


What is dynamic memory allocation?

793


Why is main function so important?

603






What are the 5 types of organizational structures?

539


What is stack in c?

596


What is the difference between memcpy and memmove?

587


What is the use of clrscr?

579


How can you avoid including a header more than once?

553


Explain the difference between the local variable and global variable in c?

587


Which built-in library function can be used to match a patter from the string?

729


Why do we use static in c?

623


Why c is known as a mother language?

627


Write a program to check whether a number is prime or not using c?

564