When the design recommends static functions?

Answers were Sorted based on User's Feedback



When the design recommends static functions?..

Answer / manu

The design reccommends static functions when you need to
call the function even when the class is not instantiated.

Is This Answer Correct ?    5 Yes 0 No

When the design recommends static functions?..

Answer / aruna kumar samal

When you want to use the function inside the program , not
outside then dsign recomend to do so. This does not have a
this pointer.static function maynot be virtual.there will
not be same version of static and non static function.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C++ General Interview Questions

What is function prototyping? What are its advantages?

0 Answers  


Evaluate !(1&&1||1&&0) a) Error b) False c) True

0 Answers  


What do you understand by zombie objects in c++?

0 Answers  


What is the use of object in c++?

0 Answers  


can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is <location>somewhere</location> #include <iostream> #include <fstream> #include <string> using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "<<location << endl; cout << "Temperature: " << temperature << endl; system("pause"); } string find_field(string myPage,string find_string){ int temp=myPage.find(find_string); if(temp!=string::npos) { cout << "Match found at " << temp << endl; } return "found?"; } ///

0 Answers  






What do nonglobal variables default to a) auto b) register c) static

0 Answers  


What is setfill c++?

0 Answers  


Search for: what is pair in c++?

0 Answers  


What is null c++?

0 Answers  


How do you test your code?

4 Answers   Microsoft,


Is dev c++ free?

0 Answers  


Define token in c++.

0 Answers  


Categories