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
Explain the virtual inheritance in c++.
Explain how the virtual base class is different from the conventional base classes of the opps.
Why is swift so fast?
What is binary object model?
What is vector string in c++?
How is c++ used in the real world?
what is C++ exceptional handling?
What are destructors?
What is the cout 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 would you implement a substr() function that extracts a sub string from a given string?
What is c++ iterator?
What is the use of object in c++?
How c functions prevents rework and therefore saves the programers time as wel as length of the code ?
How would you find out if a linked-list is a cycle or not?