what do you mean by static member variable?
Answers were Sorted based on User's Feedback
In C++ when you declare and define a static variable, it
tells the compiler that only one copy of memory will be
allocated and all the objects of that class will share that
copy.
As we know for class data variables memory will be created
independently for every object of that class. and we can
access the data using object. But, for static variables
memory is created only once for all objects and is no object
is owned the static variable. we can access the static
variable using class name.
Mainly static variables are used when want to count the
objects created and destroyed and when we are dealing with
singleton design pattern.
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / bhaskar
when static member variable executed that variable value is
automatically assigns to zero....
| Is This Answer Correct ? | 4 Yes | 3 No |
which structured data type is not used in c++? 1.union 2.structure 3.string 4.boolean
The company is a fake company asking for money of RS10000 while training and not offering a job after training. My humble request to you people not to attend Astersys interview
What do you mean by binding of data and functions?
What is overriding in oops?
In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond? 1) The first argument passed into the program 2) The program name 3) You can't define main like that
design class for linked list and include constructor,destructor,insert option. node of form struct node { int data; struct node &ptr; }
Why do pointers exist?
why in java first invoke public static void main(String args[]) method????Why not public static void method1(String args[])??
write a short note on Overloading of Binary Operator?
Program to read a comment string
What are main features of oop?
You have one base class virtual function how will call that function from derived class?