473,382 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

storage classes

13
Hi all,

Explain about automatic and static storage classes?

How can they bind with external linkage and internal linkage?

Differentiate between scope and life teime of the variable?
Jan 11 '07 #1
1 1696
Banfa
9,065 Expert Mod 8TB
automatic storage class is the class used by default when a variable is declared inside a function. A variable with automatic storage class only exists for the lifetime of the function call and the variable is only in scope inside the code block in which it is declared.

static storage class is in effect if the static keyword is used or by default for a variable declared outside a function. The variable exists for the lifetime of the program execution and is in scope inside the code block in which it is declared.

For a variable declared outside a function if the static keyword is used then the variable is not accessible externally to the file, otherwise it is via an extern declaration.
Jan 11 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: aneesh | last post by:
Hi all, I have a program, this works fine but if we declare static below "int i" it shows different storage class specifier. what will be the reason. #include <stdlib.h> static int i ; int...
0
by: terminator(jam) | last post by:
Since delaration of C++ the r/l-valueness of objects has been source of confusion there are some actions that can perform on lvalues but not on rvalues , especifically on initrinsic types .BTW the...
2
by: e2point | last post by:
i need to create a storage module which can store any thing the user wants. I want it to handle almost any storage requirement, so that clients can define their own key classes derived from the...
2
by: sumsin | last post by:
are 'mutable' and 'volatile' a Storage Classes in C++?
16
by: Joe Strout | last post by:
One thing I miss as I move from REALbasic to Python is the ability to have static storage within a method -- i.e. storage that is persistent between calls, but not visible outside the method. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.