What are the different types of Storage classes?
Answers were Sorted based on User's Feedback
Answer / saroj das ,balsore
storage class is an instruction that give compiler 4
instructions . there are 4 type storage class 1) automatic,
register , static ,external
Is This Answer Correct ? | 44 Yes | 1 No |
Answer / manjusinga
There are four types of storage classes.
1.Automatic: The scope is within the class that is like
local to its class
2.Extern: The scope of this is used within the class as
well as outside the class.so it is global
3.Regiter: These are mainly used for faster access of data.
4.Static: Once you declare the variable as static it will
remain constant throughout the program
Is This Answer Correct ? | 48 Yes | 6 No |
Answer / ranjeet garodia
answers given by Manjusinga about static is wrong:
it will be
4.Static: Once you declare the variable as static it exist
till the life of the program.
Is This Answer Correct ? | 17 Yes | 3 No |
Answer / anil
internal static is a storage that is local to the program
and is allocated prior to execution time.That is at
executing time this storage exists,it is reserved for all
time,whether it is used or not and the values remain same
throughout the calls
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / narendra kumar
ans 2 is correct but only a wrong thing in this is static
means it's scope exits through out the programme.it is same
as the global declaration of the object.
ex. static count=0;
++count
it will give 1
in another function we use ++count than it will give 2 not 1
Is This Answer Correct ? | 5 Yes | 1 No |
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
Which format specifier is used for printing a pointer value?
What is difference between class and structure in c++?
WHAT IS THE ABREVATION OF FORTRAN?
What is the use of bit fields in structure declaration?
What does h mean in maths?
How does list r; differs from list r();?
What is c++ array?
Why do we use pointers in c++?
What are literals in C++?
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
How can I learn dev c++ programming?