ALLInterview.com :: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
   
 
Categories >> Software >> Programming Languages >> C++ >> OOPS
 


 

 
Question what is a ststic variable and stiticfunction
briefly explain with exmple and in which case we use
 Question Asked In Companies :: HCL,     < I also faced this Question! >
 Question Submitted By :: saroj
  Answer Posted By  
 
Answer
When a variable is declared with static keyword,its called
as static variable,means it retains its value across
different function calls.Its basically used for counting no
of objects created for a class in C++ and its initialized to
0 by default.

When a function declared as static,its called as static
function.It can only operate on static variables.

Is This Answer Correct ?    3 Yes 1 No


 
  subhashish sen
 
View All Answers
 
 
Please Help Members By Posting Answers For Below Questions
 
 Question Views   Select
 
Prepare me a program for the animation of train 839
write string class as your own class in java without using any built-in function 756
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION? 303
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory 1408
which feature are not hold visual basic of oop? 512
officer say me - i am offered to a smoking , then what can you say 435
what is the sylabus for priliminaries? 470
what are the different types of qualifier in java? 599
Get me a number puzzle game-program 489
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai. 572
any one please tell me the purpose of operator overloading 790
Is this job good for future? can do this job post grduate student? 394
when to use 'mutable' keyword and when to use 'const cast' in c++ 475
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated. 358
How to reverse a sentence in c program ex: ram is a good boy answer: boy good a is ram 1091
E-Mail New Answers        Answer Selected Questions