Answer Posted / mike
Types of storage class variables in C++:
Automatic.
Extern.
static.
Automatic variables are those which are local to a function
and which are created when the function is called and
destroyed when the function is exited. The memory is
allocated and deallocated on the stack as and when the
function is called and exited.
External variables are global variables and are accessible
to all the functions in the program. They exist throughout
the program.Memory is set when they have have been declared
and will remain till the end of the program.
Static variables are like external varibles which will be
declared within a function and will maintain their values
between function calls.They also exist until throughout the
program
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
Why do we use classes in programming?
Explain selection sorting?
What is meaning of in c++?
Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.
Can we define a constructor as virtual in c++?
Explain storage qualifiers in c++.
Write a program to find the Factorial of a number
Why is c++ is better than c?
What apps are written in c++?
What is singleton pattern in c++?
What is c++ best used for?
Explain shallow copy?
How are virtual functions implemented in c++?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random