what is difference between static and non-static variables
Answer Posted / achal ubbott
The above answers are correct. A local static variable is
stored in heap. But a local variable is stored onto stack.
A Global variable made static can't be accessed from a
function outside the file using extern. So it limits the
scope.
| Is This Answer Correct ? | 2 Yes | 10 No |
Post New Answer View All Answers
What is the best c++ book for beginners?
Do you need a main function in c++?
Which bit wise operator is suitable for turning off a particular bit in a number?
What is the difference between c++ and turbo c++?
List the features of oops in c++?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What are pointer-to-members? Explain.
What do you mean by public protected and private in c++?
How can you link a c program with a c function?
What are the unique features of C++.
Name the implicit member functions of a class.
What is c++ hash?
Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02
How do you clear a map in c++?