GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Wipro  >  Technical
Go To First  |  Previous Question  |  Next Question 
 Technical  |  Question 49 of 157    Print  
What is the usage of static function?
to access static members




  
Total Answers and Comments: 2 Last Update: May 29, 2008   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 05, 2007 15:48:00   #1  
bhoji_005        

RE: What is the usage of static function?
If you write int i;
then i contain garbage value.
If you intilize with static int i;
Then i contain 0 by default

 
Is this answer useful? Yes | No
May 29, 2008 02:35:42   #2  
arunMkumar Member Since: May 2008   Contribution: 5    

What is the usage of static function?
In oops Static functions let u to invoke it with out any object of a class instead u have to use the class name to invoke it...

main()
{
class_name::static_fn_name();
}

 
Is this answer useful? Yes | No

 Related Questions

When an array is passed to a function what exactly is passed. A. The values of the array B. The address of the starting variable in the array. C. The addresses of the elements in the array D. None

Compiler recognizes the function as pure virtual function if A. The function if equated to 0. B. The function has no body C. If it is declared with the keyword virtual D. None

Which of the following is correct A. static enum num{ON, OFF} B. static const enum num{ON, OFF} C. const enum num{ON, OFF} D. None

What is the function of shell? A. Interpreter B. command interpreter C. interface D. none of these

Static member of a class is A. Class specific B. Object specific C. Referenced by using the scope resolution operator D. A and C

to access static members  
Latest Answer : In oops Static functions let u to invoke it with out any object of a class , instead u have to use the class name to invoke it...   main() {   class_name::static_fn_name(); }                                 ...

7  
Latest Answer : its 7, because even though its only assignment, the control enters the if block, though its assignment its not a false stmt, so once control enters the if block i=7, so return value is 7 and not 6. :) ...

The operation to be performed on a stack using a linked list can be realized using the function A. delete front, insert rear B. insert front, delete rear C. delete front, insert front D. delete rear, insert rear

If function t is called what is printed void r(int x ,int y, int &z) { cout <<"r:x="<

What action does a typical user defined signal handler functions perform? 
View Question | Asked by : myhome


 Sponsored Links

 
Related Articles

SOA Industry Usage

SOA Industry Usage First time usage of SOA tends to highlight the need for semantic interoperability While SOA provides framework for integration of cross Business operations with information flow in real time there is also a major semantic interoperability conflict that is not being addressed dir
 

C++ Static Functions

C Static Functions Static member functions have a class scope and they do not have access to the this pointer of the class When a member is declared as static a static member of class it has only one data for the entire class even though there are many objects created for the class The main usage of
 

C++ Pure Virtual Function and Base Class

C Pure Virtual Function and Virtual Base Class In this C tutorial you will learn about pure virtual function declaration of pure virtual function and virtual base class virtual base class and how to implement a virtual base class explained with examples mosgoogle center What is Pure Virtual Function
 

C++ Function Passing Types

C Function Passing Types In this C tutorial you will learn about function passing types two types of arguments passing in functions passed by value&nbsp; and&nbsp; passed by reference are discussed here mosgoogle center The arguments passed to a function can be performed in two ways Passed
 

What is DECODE function used for?

DECODE is used to decode a CHAR or VARCHAR2 or NUMBER into any of several different character strings or numbers based on value. That is DECODE does a value-by-value substitution. For every value that is given in the DECODE function it makes an if then check and matches the value. The general format
 

printf() Function Return Value

What is the return value from printf() function? printf function always returns the number of characters printed. Let us understand this with an example: main() { int a=10; printf(&quot;%d&quot;,printf(&quot;%d %d %d&quot;, a,a,a)); } In this above program the inner printf i
 

How is the main() function declared?

The declaration of main can be done as int main() One more declaration that can be taken by main is command line arguments form int main(int argc, char *argv[]) or this can also be written as int main(argc, argv) int argc; char *argv[]; NOTE: It is not possible for one to declare the main
 

How does the function call within function get evaluated?

Whenever we have more than one function which is called for a finite number of times then such a function gets evaluated from inside out. Let us understand this concept with an example. For instance consider a function sample called within it 4 times as given in program below: main() { int a=50;
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(&ldquo;%d&rdquo;,x); z= sample() } sample() { printf(&ldquo;Testing program&rdquo;); } Output is &nbsp;&nbsp;&n
 

What is the default return value of a function?

The default return value from a function is int. In other words, unless explicitly specified the default return value by compiler would be integer value from function.&nbsp;&nbsp; When a programmer wants other than integer values to be returned from function then it is essential that the pro
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape