GeekInterview.com
Series: Subject: Topic:
Question: 501 of 587

What is storage class and what are storage variable ?

A storage class is an attribute that changes the behavior of a variable. It controls the lifetime, scope and linkage.There are five types of storage classes 1)auto   2)static   3)extern  4)register   5)typedef
Asked by: Interview Candidate | Asked on: Mar 6th, 2005
Showing Answers 1 - 1 of 1 Answers
Sandhya.Kishan

Answered On : Mar 28th, 2012

View all answers by Sandhya.Kishan

Storage class are used to define the lifetime and scope of a function or available.There are four storage classes namely auto,static,register and extern storage classes.
Storage variables are the variables which assigned to storage classes it determines the lifetime and scope.
Auto-lifetime is till the execution of program and scope is local to the function or program.
Static-lifetime is static and scope is internal to the unit for which it is created.
Register-variables are stored in faster access memory.
Extern-lifetime is static scope is global as it can be accessed anywhere in the entire program or outside a function.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.